Cruz said he's tougher on immigration than Trump. (AP Photo/Andrew Harnik)

Sen. Ted Cruz said Monday that he's tougher on immigration than Donald Trump.

Speaking with people after a campaign event in Boone, Iowa, the Texas Republican said in response to a question that he agrees with Trump's assertion that all undocumented immigrants should be deported.

"Absolutely,  yes," he said. And then he went further.

"And in fact, look, there's a difference," he said, according to a video of the exchange first reported by BuzzFeed. "He’s advocated allowing folks to come back in and become citizens. I oppose that."

Cruz was asked by reporters at a campaign stop in Winterset, Iowa, later Monday if he thought there should be exceptions for deportations.

"I believe we should enforce the law," he said. "The law requires that anyone here illegally who is apprehended should be deported."

The campaign for Republican presidential candidate Ted Cruz released an ad envisioning a different kind of immigration crisis on Jan. 5. (Ted Cruz)

Cruz has attempted to paint himself as the toughest candidate on immigration, laying out a plan that would crack down on undocumented immigrants. One of the aspects - limiting legal immigration - is a reversal of his previous stances.

[Ted Cruz unveils immigration plan — on Marco Rubio’s home turf]

Cruz and Sen. Marco Rubio (R-Fla.) have been battling over the issue of immigration, with Cruz and his surrogates reminding voters of his role in a Senate bill that would have given a path to citizenship for undocumented immigrants, something Cruz calls "amnesty." Rubio argues their positions are the same, pointing to an amendment Cruz offered to the bill that would have allowed undocumented immigrants a path to legal status. Cruz claims the amendment was a poison pill.

[It’s on: Rubio and Cruz clash over immigration and the GOP’s future]