By WILL WEISSERT
Associated Press

GREENVILLE, S.C. (AP) — Ted Cruz has for months repeated that when it comes to immigration, he has never supported granting "amnesty" or "legalization" to people in the United States illegally.

He’s half right.

Cruz once advised a White House working group that crafted President George W. Bush’s ultimately unsuccessful 2004 immigration overhaul, which sought to offer temporary work visas to millions of people in the country illegally. He also was Texas state chairman of a conservative Hispanic organization that advocated for Bush’s proposal.

And, in the Senate in 2013, Cruz sought to amend a sweeping immigration overhaul carried by one of his now presidential rivals, Marco Rubio. Cruz wanted to remove the possibility of obtaining U.S. citizenship, but didn’t touch language allowing for a pathway to legal immigration status for those here illegally.

Cruz’s past public statements seemingly supporting immigration reform with his amendments came back to haunt him during a Republican debate last month in Iowa — and the issue could prove thorny yet again for him during Saturday night’s debate in Greenville, just a week before the South Carolina primary.

The change of heart on immigration reflects Cruz’s small but important shift to the right on one of the presidential race’s hottest-button issues, as a candidate who is already a tea party darling looks to further solidify his conservative credentials.

Cruz also has abandoned his past support for encouraging legal immigration, now opposing legal newcomers as long as national unemployment remains high. And he’s called for a moratorium on visas for highly skilled foreigners — when three years ago he supported a five-fold annual increase in such visas.

The senator has been less equivocal about amnesty, or offering blanket U.S. citizenship to millions of people here illegally. In a questionnaire completed while a 2012 Senate candidate in Texas for NumbersUSA, which advocates lower immigration levels, Cruz said he opposed amnesty — and he still does.

He also answered that he supports ending birthright citizenship. Anyone born in the U.S. is an American citizen.

Cruz has retained that position during his presidential campaign, though he now calls for challenging the practice’s constitutionality in court. As recently as 2011, Cruz cast doubt on doing that very thing, saying legal arguments against birthright citizenship’s constitutionality were "not very good."

Robert De Posada, founder of the conservative advocacy organization the Latino Coalition, said Cruz advised a special Bush administration working group that helped draw up plans for legalizing millions of people in the country illegally via a guest worker program. Bush announced the plan in January 2004, but it never passed Congress.

Cruz also served as Texas chairman, and was on the board of directors, of the Hispanic Alliance for Progress Institute, a now-defunct group that championed Bush’s proposal — but opposed amnesty.

"He was the smartest guy in the room and he contributed immensely to helping to craft the policy language around immigration reform," said Leslie Sanchez, co-chairwoman of the alliance.

The group had offices in Washington and Austin, where Cruz served as Texas solicitor general from 2003 until 2008. Cruz co-chaired a 2005 alliance event a few blocks from the Texas Capitol.

"It was an interesting time when you could say things like, `Let’s expand immigration and trade at the border,"’ said Buddy Garcia, then Texas’ assistant secretary of state, who spoke on a panel at the event. "Now, there’s a little more of a sinister tone."

Cruz presidential campaign spokeswoman Catherine Frazier noted that, while running for the Senate, Cruz also faced questions about the alliance.

"This is old news on which Cruz’s 2012 Senate opponent attacked him and failed," Frazier said.

Cruz also was a domestic policy adviser for Bush’s 2000 presidential campaign and helped draft its immigration policy — which laid the groundwork for what became the 2004 proposal.

Charles Foster, a Houston immigration attorney who worked closely with Cruz to shape the Bush campaign’s immigration plan, said Cruz may have only been advocating Bush’s beliefs back then. But he said Cruz has "certainly taken more restrictive positions" since.

Cruz’s other shifts came more recently.

In 2013, he introduced an amendment to Rubio’s immigration bill stripping any chance for citizenship but leaving intact possible legal status for people in the country illegally. Cruz also drafted amendments doubling legal immigration limits and increasing from 65,000 to 325,000 the number of annual temporary visas for highly skilled foreign workers.

His presidential campaign’s immigration plan is far harsher, however, saying the U.S. should suspend legal immigration "so long as workforce participation rates remain below historical averages." Cruz also proposed a six-month freeze on high-skilled visas to investigate possible abuses.

Cruz now says his amendments were meant to sink the ultimately unsuccessful immigration bill, which he voted against. But during the Jan. 28 presidential debate, Fox News played past clips of Cruz repeatedly saying he wanted immigration reform to pass and that he hoped his amendments would help.

"Was that all an act?" moderator Megyn Kelly asked.

Cruz responded that his proposed changes didn’t mean he supported the full bill. Frazier added that Cruz’s Senate record proves he’s "a tireless opponent of amnesty."

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox