 -- Sen. Marco Rubio knocked Republican presidential rival Sen. Ted Cruz's immigration record on ABC's "This Week" today, saying the Texas senator has shifted positions based on political "calculation" as the election nears.

The two -- who are second and third in several national polls ahead of the Iowa caucuses -- have spent more than a month criticizing each other on several issues, including immigration and national security. Rubio said his primary opponent hasn't shown consistency with his record on immigration.

"When it comes to Ted, he has changed his positions on immigration all over the place," he said. "He used to be for birthright citizenship, now he says he’s against it. He used to be for legalizing people that were here illegally, now he says he’s against it.”

“This is not consistency,” Rubio continued. "This is calculation as he’s changed his positions on these issues as we get closer to Election Day."

On Sunday afternoon, the Cruz campaign hit back.

“As much as Rubio now regrets joining up with Chuck Schumer and the Gang of Eight, the record is exceptionally clear,” said Cruz spokesperson Rick Tyler.

“[Rubio] supported dangerous policies that would have encouraged more illegal immigration, left our border wide open, and allowed Syrian terrorists acting as refugees into the country,” Tyler said.

“The American people are not confused on these points no matter how many times Senator Rubio says otherwise,” he added.

On This Week, Rubio also called Cruz out for comments he once made about Edward Snowden, the former National Security Agency contractor who leaked classified information about government surveillance programs and is now living in Russia under asylum. In 2013, Cruz said Snowden had done a "public service" by showing the NSA was "seizing millions of personal records about law-abiding citizens" with "minimal restrictions on accessing or reviewing those records."

“I never believed Edward Snowden was a good public servant the way that Ted Cruz once said that he had done a public service for America,” said Rubio. "Edward Snowden is a traitor.”

Rubio then went on to bash Cruz for having voted to weaken government surveillance programs, a now common line of attack.

“We should not have a commander in chief that wants to weaken our intelligence programs,” Rubio said.

The Cruz campaign has previously responded by calling Rubio’s national security positions “dangerous” and “incoherent”.

"Rubio's foreign policy and national security strategy is to invade Middle Eastern countries, create power vacuums for terrorist organizations, allow their people to come to America unvetted, give them legal status and citizenship, then impose a massive surveillance state to monitor the problem," Cruz's national spokesperson Alice Stewart said in a statement last week.