Republican presidential candidate Ted Cruz on Friday took a sharp turn to the right by laying out a plan that would place new limits on legal immigration, increase deportations of undocumented immigrants, end birthright citizenship and build a wall along the US-Mexico border.

The Texas senator unveiled his proposal at a fiery campaign rally in Orlando, Florida, where he echoed the hardline immigration rhetoric of Republican frontrunner Donald Trump. While Cruz has been a vocal opponent of comprehensive immigration reform, the senator has until now supported measures to expand legal immigration to the United States.

But in recent days, he has been locked in a war of words with Marco Rubio, the Florida senator who like Cruz has steadily risen in the Republican presidential polls. Cruz’s latest move marks an attempt by the senator to seize Trump’s followers and claim the mantle of the outsider candidate during a primary driven in no insignificant part by divisions over immigration.

Under his new plan, Cruz pledged to “build a wall that works” and triple the number of patrol agents along the Mexican border. Most notably, he proposed to halt increases to legal immigration “so long as workforce participation rates remain below historical averages”, an undisputed about-face from policies Cruz has previously championed.

Cruz has previously backed a five-fold expansion of the H-1B visa program for high-skilled workers, a position he frequently touted before pro-business audiences. One amendment introduced by Cruz in 2013, during an immigration reform debate in the Senate, would have increased the number of H-1B visas to 325,000 from 65,000 annually for high-skilled workers.

On Friday, Cruz also said the H-1B visa program should be suspended for 180 days to probe reports of abuse.

“Legal immigration needs to be structured so that it serves America’s needs,” Cruz said. “We welcome people from all over the world, but we shouldn’t welcome people defying and gaming our laws.”

Cruz also declared that it was “well past time to end birthright citizenship”, echoing his recent support for an amendment to the US constitution and an idea pushed heavily by Trump over the summer.

Although Cruz said months ago that he held a similar view, the Texas senator said as recently as August that it would be “difficult to achieve”. And in 2011, Cruz argued that it was “a mistake” for conservatives to try and fight the constitution’s protection of birthright citizenship.

Cruz was born in Canada to an American mother and Cuban father and held dual citizenship until last year. But as questions surfaced over the legality of a potential presidential bid on his part, Cruz formally renounced his Canadian citizenship.

Cruz also said he would immediately repeal Barack Obama’s executive actions on immigration, which provide deportation relief to millions of undocumented immigrants – including those brought to the country as children and the parents of US citizens or lawful permanent residents. Rubio has also vowed to phase out Obama’s immigration programs, although he has not committed to doing so right away.

Cruz and Rubio are the only two Latino candidates on either side of the 2016 field, and both have benefited in recent weeks after registering strong performances in consecutive debates. Speculation has risen that the Republican primary could boil down to the two first-term, 44-year-old senators, and Cruz began to hint earlier this week at how he would approach a battle with Rubio.

Cruz initially dubbed Rubio as a “moderate” who would compete in the establishment lane, a veiled jab in a primary dominated by outsiders and deep-rooted frustration with Washington.

After the fourth Republican presidential debate, Cruz quickly picked a fight with Rubio over his work on a comprehensive immigration reform bill in 2013 and likened Rubio’s support for the legislation as being in favor of “amnesty”.

Although Rubio has long distanced himself from the bill, it continues to be seen as his main liability in the primary – especially with figures like Trump and Cruz looking to further incite conservative anger over the issue with sharp anti-immigration rhetoric.

Rubio hit back by highlighting Cruz’s own support for legalizing undocumented immigrants. During the same immigration debate in 2013, Cruz offered an amendment to Rubio’s bill that would guarantee legal status but bar any pathway to citizenship.

“On the immigration front … I’m puzzled and quite frankly surprised by Ted’s attacks since Ted’s position on immigration is not much different than mine,” Rubio told reporters Friday after addressing a Republican conference in Orlando, where Cruz also spoke. “He is a supporter of legalizing people that are in this country illegally.

“If he’s changed that position, he certainly has a right to change his position on that issue, but he should be clear about that.”

Cruz laughed off Rubio’s comments in his own interview Friday, calling it a “truly stunning” statement.

“That’s like Obama saying my position is the same as his on Obamacare,” Cruz said. “That’s like Ayatollah Khamenei saying my position is the same as his on the Iranian nuclear deal.”

Cruz’s campaign has insisted the legalization measure was designed to kill the broader immigration reform efforts. As his aides put it, Cruz’s goal was to expose that Democrats would settle for nothing less than citizenship in the hopes that Republicans might rescind their support for the comprehensive bill – but it passed on an overwhelmingly bipartisan vote anyway.

Even so, several clips and interviews with Cruz reveal he advocated in favor of legalization – which were fervently circulated by Rubio’s campaign over the past two days on social media and in press releases.

Cruz’s new immigration plan did not address the roughly 11 million undocumented immigrants. Whereas Trump has said he would deport them all, Cruz proposed simply to “increase deportations” and multiple attempts by reporters on Friday to get more specificity were ignored.

In his remarks on Friday, Cruz launched into a lengthy rant against “amnesty” in a bid to portray it as counter to conservative ideals.