The senator from Texas and Republican presidential candidate, who rose to national prominence because of his hard-line stands on everything from Obamacare to immigration, is under fire for his past support of the controversial H-1B visa program.

Cruz has backed quintupling the number of visas in the program, which encourages legal immigration for highly skilled foreign workers. But it's a position that's causing headaches for him as the campaign develops.

"You've got Hillary Clinton, Jeb Bush, Marco Rubio and even Ted Cruz, to my disappointment, who want to do everything from double to triple to quintuple -- in Ted Cruz's case -- the number of H-1B visas that are available to these largely offshore outsourcing companies from India," influential conservative pundit Michelle Malkin said in a video on her Facebook page last week. "That is nuts."

For Cruz, support for H-1B visas has been a way to insulate himself not just from a hot red base quick to label any moderation as amnesty, but also from his unwillingness to say what he would do with the 11 million undocumented immigrants in the United States. Sharing his father's dramatic flight from Cuba, Cruz tells reporters or town hall questioners that he "celebrates legal immigration" and that he would like to "streamline" the process -- even as he cracks down on illegal border crossings.

But Cruz appears to be changing his tune. During Tuesday night's Fox Business debate in Milwaukee, he framed illegal immigration as an economic threat, choosing the rhetoric used by conservative talk radio hosts who have raked Cruz over the coals, rather than his tried-and-true stump speech about preserving rule of law. And Cruz now no longer supports an increase in the number of visas until the program is reformed, spokeswoman Catherine Frazier said Wednesday.

Charges of outsourcing and abuse

The U.S. currently allows only 65,000 workers who specialize in science or technology to immigrate legally each year. (An additional 20,000 are allowed under an exemption for those holding advanced degrees earned in the United States.) But the program has come under increasing criticism from protectionists and American industries that say the country is "outsourcing" labor and charge there is widespread abuse of the visa system.

Cruz has of late been more loudly voicing objections to the visa process, telling a New Hampshire voter in a town hall on Wednesday evening that the emerging reports are "horrifying," a shift he signaled in an interview with radio host Vince Coakley last week.

"I have been very, very concerned at the growing abuse of the program," Cruz said. "That's not what the H-1B program was designed to do."

That interview made its way to Republican Sen. Jeff Sessions of Alabama, perhaps the GOP's leading anti-immigration voice. Sessions said he is talking with Cruz about his current position and even hinted that Cruz could flip his position, sounding skeptical that the senator from Texas would still want to quintuple the number of legal immigrants in the future.

"I think a lot of our members will come out that way in the end," Sessions told CNN.

Rubio to Cruz: We're not that different

Cruz is hardly the only GOP candidate who backs the program on some level. Republicans from Bush to Ben Carson have voiced some support for H-1B visas, and Rubio's push for a more ambitious, Microsoft-backed bill has drawn the ire of Sessions, who said Rubio's legislation would "quash the dreams of more talented Americans."

Rubio, speaking in Hilton Head, South Carolina, Thursday, noted Cruz's support for H-1B visas as the two senators spar over broader immigration policy.

"Ted is a supporter of legalizing people that are in this country illegally," Rubio said. "In fact, when the Senate bill was proposed he proposed legalizing people that were here illegally -- he proposed giving them work permits. He's also supported a massive expansion of the green cards. He's supported a massive expansion of the H-1B program - a 500% increase."

He added: "If you look at it, I don't think our positions are dramatically different."

Jeb Bush, who has taken a more moderate line on immigration reform, said Thursday that the program should be "market-driven."

"If there are shortages that make it harder for investment to take place in our country, then it should be expanded. If there's not a shortage, then it shouldn't be," Bush said after a town hall meeting in Grand Rapids, Michigan. "And it should be analyzed based on economic need for our country and it should be -- the laws of H-1B visas -- should be enforced so that you're not, you know, outsourcing jobs to ... people and then bringing in people from the outside so folks lose their jobs and then you're hiring foreign workers."

The role of talk radio hosts

Donald Trump has already shown a willingness to mock Rubio for his aggressive support for the Silicon Valley-backed policy. Trump campaign manager Corey Lewandowski said the campaign is not planning to hit Cruz on the explosive issue, but Trump's hard line on immigration has helped shift the debate to the right on the campaign trail.

But given Cruz's ideological purity -- highlighted by a report on Monday from Heritage Action , a political group tied to the influential Heritage Foundation -- his support for H-1Bs may be the most attractive liability to attack.

Republican talkers have been Cruz's biggest gadflies. Cruz enjoys an unusually chummy relationship with conservative talk radio hosts -- joking before Tuesday night's debate that a leading trio in the industry should moderate future forums -- but some have turned on him.

The New Hampshire voter told Cruz that her brother in the tech industry might not vote for him because of his position -- which the brother learned about from talk radio.

"The rhetoric and the policy do not match," Rick Santorum told CNN on Wednesday, saying Cruz's motivation for increased legal immigration was "purely political" and an attempt to win over business-friendly donors. "This is a way of having a foot in both camps -- to sound very tough on illegal immigration, but to say, 'I'm going to take care of you by bringing in a whole bunch of people legally.'"

'I told you he's a snake'

The unease with Cruz dates back to the 2013 Senate fight over immigration, when Rubio and Democratic leaders led an ill-fated push for comprehensive reform legislation that included a path to citizenship for the undocumented. Cruz fought the bill, but also argued for an amendment to increase in the cap on visas to 325,000, a position he has repeated during the 2016 race.

But after the 2013 bill died and the dust settled, Cruz continued to be excoriated by some of the movement's leading talkers for his stance.

"I don't care how many times Ted Cruz is held up by the tea party. Ted Cruz is identical to Marco Rubio," radio host Michael Savage told his listeners in January 2014. "Ted Cruz is not to be trusted. I told you he's a snake."

Cruz's critics on the issue see room for hope: Cruz does not bring up the specific fivefold increase as often as he once did, opting for vaguer rhetoric. He chided donors and reporters in Tuesday night's debate for not seeing immigration as a pocketbook issue as opposed to a cultural one. And his radio interview last week could foreshadow the package of reforms that Sessions said Cruz is likely to introduce in the Senate over the coming months.

Roy Beck, who leads NumbersUSA , a group supporting a reduction in immigration numbers, predicted that while Cruz is "polishing some of the edges" with his new language, his support for expanded H-1Bs would be used a political wedge to expose "his real vulnerable spot."

Unless, of course, Cruz changes his position.

"I just see him month by month and shifting," Beck said. "As time goes on, you could end up being in a really different place than nine months ago."

This story has been updated to note the master's degree exemption available for H-1B applicants.