Sen. Ted Cruz (R-Texas) on Thursday rejected the idea of giving young immigrants in the country illegally a path to citizenship, one day after President Trump said he was open to the idea.

"I do not believe we should be granting a path to citizenship to anybody here illegally," Cruz told reporters, according to Bloomberg. "Doing so is inconsistent with the promises we made to the men and women who elected us."

"For some reason that to me is utterly inexplicable, we see Republicans falling all over themselves to gallop to the left of [former President] Obama in a way that is contrary to the promises made to the voters who elected us," he added.

Trump on Wednesday said he was open to a path to citizenship for some immigrants in exchange for funding for a border wall and other security measures.

"We're going to morph into it," Trump said. "It's going to happen, at some point in the future, over a period of 10 to 12 years."

Trump in October announced he would be ending the Deferred Action for Childhood Arrivals (DACA) program launched by Obama, which allowed certain immigrants who entered the country illegally as children to work and go to school in the United States.

DACA protections will begin to expire for those covered by the program on March 5.

Negotiators are now working on a deal that would replace DACA with legislation protecting the so-called Dreamers. It would be paired with border security measures and changes to other immigration programs.

Trump has demanded $25 billion in funding for his U.S.-Mexico border wall, an end to the diversity visa lottery system and limitations on family-based migration.

The fight over immigration led to a three-day shutdown of the government that ended on Monday.

Lawmakers now face a Feb. 8 deadline to pass another government funding bill to prevent a shutdown.