Martinez, 36, died in West Texas while on a patrol on Sunday morning, according to the federal authorities. The U.S. Customs and Border Protection did not provide many details about the incident, but Texas Senator Ted Cruz described it as an “attack.”

“Our condolences and prayers go out to the family and friends of Border Patrol Agent Rogelio Martinez, who was killed this morning in the line of duty. We are also praying for the full recovery of his partner, who was also attacked,” Cruz said in a statement.

“This is a stark reminder of the ongoing threat that an unsecure border poses to the safety of our communities and those charged with defending them,” he added.

Our condolences and prayers go out to the family and friends of Border Patrol Agent Rogelio Martinez, who was killed this morning in the line of duty. pic.twitter.com/izaihfIt2k

Officials said the agents were responding to activity while on patrol near Interstate 10 in the Big Bend Sector, which runs along the U.S.-Mexico border, when Martinez's partner reported that they injured and in need of assistance.

Responding agents provided immediate medical care, and transported both agents to a local hospital, where Martinez later died, according to the CBP. His partner is in serious condition, according to the agency.

“Our thoughts and prayers are with Agent Martinez and his family, and with the agent who was injured,” CBP said in a statement.

Crawford said he got the news of his death while on social media.

"Unfortunately, it was him," Crawford said. "He was such a good guy, it's so unfortunate."

President Donald Trump tweeted his condolences to the slain agent on Sunday evening as he renewed his call to build a border wall.

Border Patrol Officer killed at Southern Border, another badly hurt. We will seek out and bring to justice those responsible. We will, and must, build the Wall!