Donald Trump promised Thursday night to be flexible on immigration, and as soon as he got off the stage at the debate in Detroit he made use of that flexibility, recanting a new position on guest-workers that he’d staked out just minutes before.

In response to Fox News moderator Megyn Kelly, Mr. Trump said he had changed his stance on H-1B visas and would welcome more high-skilled workers into the U.S. workforce — a reversal of a position he listed on his campaign website.

“I’m changing. I’m changing. We need highly skilled people in this country, and if we can’t do it, we’ll get them in. But, and we do need in Silicon Valley, we absolutely have to have,” Mr. Trump said.

Indeed, Sen. Jeff Sessions, Alabama Republican, one of Mr. Trump’s most prominent supporters and a critical adviser on immigration policy, has spent his recent months fighting against the stance Mr. Trump took in Thursday’s debate.

“Megyn Kelly asked about highly-skilled immigration. The H-1B program is neither high-skilled nor immigration: These are temporary foreign workers, imported from abroad, for the explicit purpose of substituting for American workers at lower pay,” the billionaire businessman said in a statement.

“I remain totally committed to eliminating rampant, widespread H-1B abuse and ending outrageous practices such as those that occurred at Disney in Florida when Americans were forced to train their foreign replacements. I will end forever the use of the H-1B as a cheap labor program, and institute an absolute requirement to hire American workers first for every visa and immigration program. No exceptions.”

In fact, the H-1B program is commonly known as the high-skilled visa. It is generally only available to foreigners who have a higher education degree and are applying for a job that requires special knowledge in that field.

“Tonight, Donald Trump finally took an actual position. But as soon as the debate was over, his handlers made him reverse himself. The Republican nominee cannot be somebody who is totally clueless on so many issues, including his signature issue,” Mr. Rubio said.