In a move to underline his conservative credentials, Republican presidential hopeful Ted Cruz is hitting back at rivals accusing the Texas senator of a soft stance on undocumented immigrants.

The 45-year-old's views on immigration have long been among the more controversial issues of his White House bid, and his challengers have accused him of flip-flopping on immigration, noting at one point he had not entirely ruled out "amnesty for illegal aliens already here," The New York Times reported.

But following a heated exchange on the issue with the GOP's other Cuban-American candidate, Florida Sen. Marco Rubio, during last week's presidential debate, Cruz has sought to leave no doubt as to his hard-line views.

"Let's have a moment of simple clarity," he noted on the campaign trail. "I oppose amnesty. I oppose citizenship. I oppose legalization for illegal aliens. I always have and I always will."

Nevertheless, RealClearPolitics reported an interview the Texan had given CBS News in 2013 during which he had hinted at support for legal status for undocumented immigrants.

"I think there probably could be a compromise on that," Cruz said at the time, "if a path to citizenship was taken off the table."

Earlier still in his political career, the aide to then Texas Gov. George W. Bush had written a memo that took an even softer tone.

"I think we need to consider all options when trying to resolve our immigration problem and what to do with the millions of illegal immigrants already living here," Cruz said in a five-page document from 1999. "But, right now, I don't think amnesty is the answer."

Beyond Rubio, who took on Cruz on immigration directly during the latest debate, the senator's approach has drawn criticism from Kentucky Sen. Rand Paul who told CNN Cruz was changing his views according to political expediency.

"I think on a number of issues, he wants to have it both ways, depending on which audience he's talking to," the libertarian senator and presidential candidate said.