MCALLEN — U.S. Sen. Ted Cruz, R-Texas, waded into this Democratic stronghold Tuesday to celebrate the Fourth of July — and predictably got an earful from protesters, many upset with the Senate's efforts to repeal and replace Obamacare.

Cruz, who has a knack for confrontation with his political opponents in Washington and far outside it, had to speak over the demonstrators for most of his speech at an Independence Day ceremony, twice pausing to address the commotion. They were countered by a similarly vocal group of Cruz supporters, who sought with varying success to drown them out with chants of "USA!"

"Isn't freedom wonderful?" Cruz said shortly after taking the stage. "Think about it: In much of the world, if protesters showed up, they would face violent government oppression. In America, we've got something different."

As he ended his remarks, Cruz again made reference to the protesters, addressing them as "our friends who are so energized today that they believe that yelling is a wonderful thing to do."

"I will say you have the right to speak, and I will always defend your right to speak and participate in the democratic process," Cruz said. "That's what makes us free, that's what makes us America."

Protesters turned out for U.S. Sen. Ted Cruz's Fourth of July visit to McAllen. Doug Young for The Texas Tribune

Cruz received a calmer reception later in the morning as he participated in a parade through downtown McAllen, waving from the back of a convertible followed on foot by two security guards.

Yet Cruz's appearance in McAllen did not go unnoticed by local Democrats. Speaking after Cruz at the ceremony, U.S. Rep. Vicente Gonzalez of McAllen called on Cruz, who was seated behind the congressman, to join him in urging President Donald Trump to work to bring home military veterans who have been deported. Gonzalez recently met with Trump about the issue.

"Today I ask Sen. Cruz to support me on this idea — and all the others senators and members of Congress," Gonzalez said. "We should not leave one soldier behind."

Cruz's involvement in the July Fourth festivities had become something of a local story here in recent days. After the announcement of his participation drew a backlash, McAllen Mayor Jim Darling released a statement defending the senator's attendance at the event, which Darling called an "opportunity to engage in productive dialogue."

There appeared to be an initial possibility that Cruz could meet with La Union del Pueblo Entero, a local immigrant rights group, while in McAllen. But the organization ultimately declined to visit with Cruz, pushing instead for a town hall where the senator could hear directly from his constituents.

Cruz has made three trips to McAllen since December, part of an uptick in travel across the state after his 2016 presidential campaign — and a 2018 re-election race against U.S. Rep. Beto O'Rourke, D-El Paso. For his part, O'Rourke was over 600 miles away Tuesday morning, participating in the July 4 festivities in Lubbock, an area as Republican as McAllen is Democratic.

"I think the fact [Cruz] has been in office so long and only recently taken interest in the Rio Grande Valley means that he's not really interested in listening," said John-Michael Torres, the communications coordinator for LUPE. "He's just trying to improve his image."

While the town hall did not materialize Tuesday, Cruz did get some face time with his critics. He worked the crowd for several minutes before the ceremony, though he stopped short of the most vocal group in the bleachers, where awaiting him were signs saying, "Ted wants us dead," and "Cruzin for a Bruzin 2018."

Speaking with reporters after his remarks, Cruz suggested the protesters were part of "a small group of people on the left who right now are very angry." Asked if he planned to directly acknowledge the protesters, he insisted he had visited with them when he greeted the crowd earlier and nodded to some common ground, noting he saw one sign about health insurance costs being too high.

"I tell ya, I agree," said Cruz, who has had a key role in negotiating the Senate's plan to repeal and replace Obamacare, though he remains a holdout on its most recent version. "I hear that from Texans all over the state who face premiums skyrocketing under Obamacare, who want relief."

Health care was a resonant issue for Matthew Martinez, a local accountant who was toting one of many signs in the crowd reading, "Health care is a human right," on one side and "Beto 2018," on the other.

"He wants to completely gut Obamacare," Martinez said of Cruz, "and he's one of the few people against the Trump plan because he wants it to be stronger, which is crazy."

Alex Gelman, a local GOP activist who had helped pass out pro-Cruz shirts and signs, said he and others wanted to show Cruz still has support in the Valley despite its strong Democratic tradition. Lingering on the sidewalk after the program, he said he found the protesters a bit disrespectful.

"If you want to protest us, fine, but just let him speak," Gelman said. "He might — might — say something you like."