EDINBURG — Flanked by suit-and-tie-clad U.S. Border Patrol agents at an invite-only event just one day after formally launching his re-election campaign, U.S. Sen. Ted Cruz, R-Texas, profusely thanked law enforcement personnel on hand here last week, signing memorabilia and posing for selfies.

Protecting the border can often be a thankless job, Cruz said afterward, which is why he wanted to come here, a place where he historically hasn’t had much support. And the National Border Patrol Council, the estimated 18,000-member labor union, wanted to show its appreciation for Cruz, which is why its president, Brandon Judd, offered an endorsement to the junior senator on Tuesday.

Cruz said he wants to build on the 31 percent of Hidalgo County voters who cast their ballot in his favor in the 2012 election, but political observers say such events aren’t aimed at local voters. The NBPC is a national organization that resonates more with communities further from the border than those along it.

However, before 2016, the council had stayed away from elections. Last week was the second time the council had endorsed a candidate. The first was in 2016 for then-candidate Donald Trump, whose campaign reached out to request the group’s backing, according to Judd — an active agent stationed in Montana.

But despite the 200-person crowd at Tuesday’s campaign rally at the council’s Edinburg office, where some chanted “build the wall” during the event’s conclusion, political observers said Cruz’s Rio Grande Valley visit was different than most of his other 11 campaign stops throughout the last week.

While many of those events were held to build voter support in those areas, receiving the NBPC endorsement in the Valley wasn’t for most Valley voters, the observers said.

“The Valley was more the backdrop for the announcement, not the focus for the announcement,” said Mark Jones, a political scientist at Rice University’s Baker Institute. “It’s the ideal photo opp. Because it shows Ted Cruz on the front lines getting supported by those on the front lines every day.”

Sylvia Gorman, an assistant professor of political science at the University of Texas Rio Grande Valley, said she tried to attend the Edinburg event but was not permitted.

“It was an event that he specifically chose to play up the border, especially as the rhetoric is so contentious,” Gorman said. “To play up to voters in other parts of the state, not much here.”

In addition, the event shows that a sizable group of employment along the entire U.S.-Mexico border supports Cruz, not his Democratic challenger, Beto O’Rourke, according to James Wenzel, a political science professor at UTRGV.

But an elected official coming to the Valley and using it to spread a political message elsewhere is nothing new, Wenzel said. He was more struck about something else in the endorsement.

“The irony of it to me is that Judd is from Montana,” Wenzel said. “There was a reference made that he’s keeping Montana secure. Well, keeping Montana secure from what? An invasion of caribou from Canada?”

Sergio Sanchez, the Hidalgo County GOP chair, said the message the NBPC endorsement sends is statewide.

“It’s an issue for Texas because it’s a senator seat,” Sanchez said, though he acknowledged that the Valley has long supported Democrats.

Adrienne Peña Garza, the county GOP chair-elect, said the tough part of an endorsement from a group of Border Patrol agents is that many people don’t realize how difficult their jobs are. But she, too, acknowledged the strong Democratic area in which Cruz received this endorsement.

The senator, however, said he believes the message resonates with Valley voters.

“I think the men and women of South Texas appreciate Border Patrol agents who risk their lives to keep them safe,” Cruz said after the event. “They see first hand (agents as) their friends, their neighbors and they know it’s not an easy job.

“I think the council has real credibility as representing the men and women on the front lines.”

In the fall, though, Cruz and Judd may have made a false start.

In November 2017, agent Rogelio Martinez was killed on patrol along the western Texas part of the border. His partner, agent Stephen Garland, was seriously injured. Judd and other NBPC officials repeatedly said the two agents were victims of a fierce attack by smugglers or undocumented immigrants.

Cruz also released a statement titled, “Sen. Cruz issues statement on attack on two Big Bend Sector Border Patrol Agents.”

No evidence of smugglers was ever found in the area, and the FBI said it was possible that the incident was an accident. Local authorities, who assisted investigations, offered that the two agents could have been hit by a vehicle.

“The early reports indicated that it was an attack,” Cruz said after Tuesday’s event. “It appears those reports were an error.”

But he didn’t regret releasing the statement. Putting that out showed his “strong support for the men and women of the Border Patrol,” he said, before quickly transitioning to the fact that the council endorsed him.

“It is significant that the Border Patrol Council formally endorsed me in this campaign,” Cruz said. “As a general matter, the council does not endorse many candidates. And the reason they did so, I believe, is the agents know I’ve got their back; that helping them do their jobs — standing up, advocating for them, championing them — is important.”

Whether that will translate to more votes from the Valley, however, remains to be seen.