Republican U.S. presidential candidate Dr. Ben Carson speaks during the second official Republican presidential candidates debate of the 2016 U.S. presidential campaign at the Ronald Reagan Presidential Library in Simi Valley, California, United States, Sept. 16, 2015. Reuters

Republican presidential candidate Ben Carson defended his immigration plan during Wednesday night's Republican debate, but his explanation only got him into further trouble with some voters. Carson supports giving guest-worker status to millions of undocumented immigrants without criminal records.

"After we seal the borders, after we turn off the spigot that dispenses all the goodies...people who had a pristine record we should consider allowing them to become guest workers primarily in the agricultural sphere," Carson said. "If they don't do it within that time period then they become illegal and as illegals they will be treated as such," he said.

Carson said his plan is not amnesty because farmers cannot find American workers, which prompted criticism from some social media users who perceived the remark as suggesting immigrants can only do farm work.

Carson has edged closer to Republican frontrunner Donald Trump in recent weeks. A recent poll found support for Carson has jumped to 23 percent, up significantly from the six percentage points Carson had before the first presidential debate in August. That puts Carson at just about 4 points below Trump.

The former surgeon has seen support surge among conservatives as he has come out as a strong opponent of government funding for the reproductive rights organization, Planned Parenthood, and has taken up other conservative causes. He is seen as a political outsider given that he had no prior experience in elected office. A recent poll in New Hampshire found that only about a quarter said experience in politics was a "very important political consideration," whereas 83 percent said bringing "real change to Washington" was important to them.

Carson and Trump have clashed in recent weeks as both have brought into question the other’s religious sincerity. Carson has been noted for his considerably calmer demeanor than the flamboyant Trump, who has frequently lashed out at his political rivals. Carson has come under scrutiny recently after it was revealed he used aborted fetuses for medical research, despite his stance against abortion and Planned Parenthood.