Sen. Ted Cruz (R-Tex.), right, accompanied by Sen. Marco Rubio (R-Fla.), speaks on Capitol Hill in Washington in September 2013. (J. Scott Applewhite/AP)

They are both young Cuban American senators who rode tea party enthusiasm into office during Barack Obama’s presidency. But now, as fierce rivals for president, Marco Rubio of Florida and Ted Cruz of Texas represent two sharply contrasting futures for the Republican Party as it seeks to broaden its appeal and regain control of the White House.

Over the past week, an increasingly nasty fight has broken out between Cruz and Rubio, producing the deepest one-on-one debate over policy and voting records in the 2016 race so far. The conflict has revealed measurable differences between the two on national security and immigration issues at a time when the world wrestles with how to respond to the Islamic State terrorist group, which asserted responsibility for last week’s deadly attacks in Paris.

The face-off also mirrors the broader rift within the GOP between insurgents such as Donald Trump, who demand drastic measures at loud volume, and the more tempered approach of Jeb Bush and other establishment-friendly candidates.

During their escalating spat, Rubio has accused Cruz of being soft on national security because he voted this year for the USA Freedom Act, which imposed more limits on government surveillance. Rubio’s campaign aides have aggressively sought to spread the criticism on Twitter and in the media.

“We’ve parted ways” on defense issues, Rubio said this week in a radio interview.

Republican presidential candidate Ted Cruz addresses the Sunshine Summit on Nov. 13 in Orlando. (John Raoux/AP)

For his part, Cruz has repeatedly accused Rubio of being too soft on immigration because he co-sponsored a comprehensive Senate bill that would have created a path to citizenship for an estimated 11 million undocumented immigrants. Cruz refers to the legislation, which died in the House, as “amnesty.”

“They are arguing about actual votes they cast,” said Bill Kristol, editor of the conservative Weekly Standard. “They have somewhat different views.”

The candidates, who both have been rising in the polls in recent weeks, are each hoping to emerge as a viable front-runner when — or if — current leaders Trump and Ben Carson fade. But they are aiming for different parts of the Republican electorate. Cruz, a political flamethrower who helped orchestrate the 2013 government shutdown, is aiming for evangelicals and tea party conservatives. Rubio is positioning himself as a bridge-builder who can appeal to a broader electorate.

The rivalry between the 44-year-olds moves to Iowa on Friday, when they are among those scheduled to speak at an event hosted by the Family Leader Foundation, a Christian conservative group.

Bob Vander Plaats, the group’s head, called it a “final exam” before an endorsement. He said that both Cruz and Rubio are on his short list.

“I see Rubio and Cruz as two of the last people standing,” said Kellyanne Conway, president of a pro-Cruz super PAC that is preparing ads hitting Rubio on immigration. She said the men represent “transformational generational change” and that it is important to show policy differences between them.

Republican presidential candidate Marco Rubio waves to the audience at the conclusion of his remarks at the Sunshine Summit on Nov. 13 in Orlando. (John Raoux/AP)

The Courageous Conservatives PAC, a small super PAC that supports Cruz, has put out at least two ads hammering Rubio on immigration reform. Rep. Steve King (R-Iowa), an immigration hard-liner, also endorsed Cruz this week.

Tensions between Cruz and Rubio broke into the open last week when Cruz attacked Rubio for pushing a bipartisan 2013 immigration bill, which Rubio has since disavowed. Rubio countered by suggesting that he and Cruz hold similar views, noting that Cruz pushed an amendment that would have allowed undocumented people to receive work permits. The amendment prevented them from obtaining citizenship.

Cruz’s campaign notes that the amendment singled out by Rubio was actually a “poison pill” aimed at foiling the legislation.

“I don’t think it’s surprising at all that the Rubio campaign is trying very, very hard to change the topic of discussion away from Marco’s long-time support and partnership with Chuck Schumer and Barack Obama pushing a massive amnesty plan,” Cruz said this week of Rubio’s attacks on his national security record.

Since abandoning the comprehensive bill, Rubio has endorsed a piecemeal approach that begins with border security and enforcing current laws before offering a path to citizenship for undocumented immigrants at some unspecified time.

Cruz is proposing new limits on legal immigration — a reversal of an earlier position — and wants to end birthright citizenship. He has not said what he would do with the undocumented immigrants now in the country. He also introduced legislation this week aimed at blocking war refugees from Syria and elsewhere from entering the country.

Alongside their immigration fight, Rubio went after Cruz hard this week over his support for the USA Freedom Act, which banned the bulk collection of data of Americans’ telephone records and Internet metadata. After warning about the threat of a terrorist attack, Rubio said Cruz voted to “weaken” surveillance efforts.

Rubio was one of 32 senators who voted against the bill.

“We get along, we share a lot of views,” but not on defense, Rubio said in an interview Wednesday with conservative radio host Hugh Hewitt.

“For the first few years in the Senate that he’s been there, he’s voted for budgets that have hurt the military,” Rubio said. “He voted for a budget that basically gutted our foreign aid program, particularly our defense of the Israelis and of aid that we provided them.”

At the same time, Rubio has come under fire from rivals for leading the Senate in missed votes. Rubio was absent for private intelligence briefings on the Paris attacks while traveling to California to raise money Wednesday; Rubio’s campaign said he received a thorough intelligence committee briefing on the attacks Tuesday.

Rubio and Cruz arrived in the Senate in 2011 and 2013, under similar circumstances. They were tea party stars who won in major upsets against better-known Republicans. Cruz’s father is from Cuba, just like Rubio’s parents. Both showed a knack for public speaking, and both embraced their rising-star status.

But the similarities quickly faded. Rubio tried to forge consensus, most notably with the immigration package. He cast hawkish votes on national security. Party leaders took a liking to him.

Cruz openly flouted Republican leadership. He waged a 21-hour talkathon over President Obama’s health-care law. Then he led a failed effort to target it that ­produced a government shutdown. On national security, he staked out middle ground between hard-line hawks and more-libertarian-minded Republicans.

On the campaign trail, Cruz is embracing the disdain of his colleagues, running against what he calls the “Washington Cartel.” Rubio’s campaign theme is sunnier, rooted in the idea of a “New American Century.”

“Senator Rubio speaks in great themes and ideas,” said South Carolina GOP Chairman Matt Moore, who must stay neutral because of his position. “Senator Cruz speaks more in quips and anecdotes. People are fans of both.”

The divide between Cruz and Rubio has also extended to donors — particularly when it comes to immigration, some say.

“Those are the two different sides of the debate in the donor class that I think you see lining up on either side of Cruz and Rubio,” said Chart Westcott, a Cruz donor.

Frank VanderSloot, an Idaho billionaire who threw his support to Rubio on Wednesday, wrote in a letter to potential Rubio supporters that Cruz is “simply not electable in a general election” and “would assure that Hillary Clinton will be our next president.”

As Cruz and Rubio go after each other, some Republicans believe it will open the door for other candidates who are trying to chase down Trump and Carson. Trump also slams Rubio regularly, while he and Cruz are cordial.

Former New Hampshire Republican Party chairman Fergus Cullen said that Bush and other establishment-friendly candidates stand to gain from Cruz picking off one of their chief rivals. “Similarly, they don’t mind Rubio going after Cruz and delivering messages they have to deliver,” he said.

Most agree that the Cruz-Rubio feud is likely to get only more contentious. Westcott, the Cruz donor, said he doesn’t think things have really exploded between them yet.

“It’s pretty soft bickering,” he said.