An Obama-era Department of Homeland Security chief is warning Democratic presidential candidates to cool their push to decriminalize illegal border crossings, saying such a move would be tantamount to “open borders” policy and lead to hundreds of thousands more people flooding into the U.S. every month.

“That is tantamount to declaring publicly that we have open borders,” Jeh Johnson told The Washington Post.

DHS ACTING CHIEF PREDICTS UP TO 25 PERCENT DROP IN BORDER CROSSINGS AFTER NEW MEXICO AGREEMENT

“That is unworkable, unwise and does not have the support of a majority of American people or the Congress, and if we had such a policy, instead of 100,000 apprehensions a month, it will be multiples of that,” he said.

In May, authorities apprehended or encountered more than 144,000 border crossers, representing a stunning increase over the past several months. Current acting DHS Secretary Kevin McAleenan said Friday that he anticipates the numbers decreased in June, amid new efforts to crack down both at the U.S.-Mexico border and Mexico's border with Central America.

Johnson’s warning that any gains could be reversed comes as 2020 Democratic presidential hopefuls have lurched to the left on immigration, calling for health care for illegal immigrants and scrapping certain immigration enforcement measures.

At a Thursday night primary debate in Miami, candidates making up about half the field were asked if they support making crossing the border a civil, rather than a criminal, offense. Almost all the candidates, including former Obama Vice President Joe Biden, raised their hands.

The moment demonstrated how a once-fringe policy, pushed earlier this year by former Housing Secretary Julian Castro, has become mainstream among Democrats. Just days before the debate, Sen. Elizabeth Warren, D-Mass., came out in favor of such a proposal.

OBAMA'S IMMIGRATION CHIEFS SPEAK OUT ON 'CRISIS' AT SOUTHERN BORDER

However, Castro on Thursday denied he supported open borders.

“Open borders is just a right-wing talking point,” he said. “It doesn’t matter what Democrats do on immigration.”

Since then Sen. Cory Booker, D-N.J. announced on Tuesday a plan to “virtually eliminate immigration detention.”

“Without waiting for Congress to act, Cory will stop the treatment of immigrants as criminals, close inhumane DHS facilities, end the use of for-profit detention facilities and end unnecessary barriers for refugees and those seeking asylum to virtually eliminate immigrant detention,” a press release said.

Johnson, meanwhile, has also pushed back on the controversy surrounding the Trump administration's use of detention centers for migrants. On Friday, he said that chain link fences or "cages" weren't ideal, but were one of the ways authorities are forced to cope with the surge of migrants crossing the border, and that the alternative was putting them "on the streets."

"Chain link barriers, partitions, fences, cages -- whatever you want to call them -- were not invented on January 2017," Johnson said.

Fox News' Sam Dorman contributed to this report.