The White House is preparing a draft order for President Donald Trump to declare a national emergency at the US-Mexico border that would let him build a wall, CNN reported Thursday.

The Trump administration has reportedly identified $7 billion in funds that could be pulled to build a barrier on the US-Mexico border. The money would largely come from the Pentagon.

The declaration of a national emergency appears to be a last resort that the administration is weighing — the Senate voted down two bills on Thursday that would have reopened the government after a 34-day shutdown.

Trump said Thursday that Senate leaders are still negotiating and that he hoped lawmakers would approve another bill that would provide a "down payment" on the wall.

The White House is drafting a national-emergency declaration, which would allow President Donald Trump to bypass Congress to fund his long-promised border wall, CNN reported Thursday.

The Senate voted down two bills on Thursday afternoon that would end the ongoing government shutdown, which has lasted 34 days and counting.

The Trump-backed Republican bill would have included $5.7 billion in wall funding and limited protections for certain immigrants, including "Dreamers." A second, Democratic bill would have opened the government without granting Trump any wall funding.

A national-emergency declaration would allow Trump to use existing funds to build the wall, and the Trump administration's plan is to deploy the US Army Corps of Engineers to construct it, according to CNN.

"The massive amount of aliens who unlawfully enter the United States each day is a direct threat to the safety and security of our nation and constitutes a national emergency," the draft proclamation obtained by CNN says.

"Now, therefore, I, Donald J. Trump, by the authority vested in me by the Constitution and the laws of the United States of America, including the National Emergencies Act (50 U.S.C 1601, et seq.), hereby declare that a national emergency exists at the southern border of the United States," it adds.

The White House did not immediately respond to INSIDER's request for comment.

Read more: Here's what would happen if Trump declared a national emergency to build his border wall

Construction of a fence takes place on April 18, 2018 in Calexico, California. Getty Images/David McNew

One official told the network that the administration is weighing pulling $3 billion in Pentagon civil-works funds and $3.6 billion in military-construction funds, as well as some Treasury forfeiture funds and Department of Homeland Security funds.

Trump has spent much of the last few weeks raging about a "crisis" he said has erupted at the US-Mexico border, propelled by of illegal immigration, drugs, and violent crime, which must be solved by constructing a physical barrier.

Critics, meanwhile, have said there is no crisis — or at least none that a wall can solve. Experts have also been divided over whether it would be legal for Trump to use a national-emergency declaration for a wall.

It's expected that if Trump went ahead with the declaration, it would immediately face court challenges.

But declaring a national emergency appears to be a last resort for the Trump administration. Even after the Senate voted down two bills to reopen the government on Thursday, Trump said he would consider a short-term deal with a "large down payment" on the wall, though the details of such a deal were unclear.

"One of the ideas is that they open it, they pay a sort of prorated down payment for the wall, which I think people would agree that you need," Trump told reporters from the White House. "Now [Senate Majority Leader Mitch McConnell] is negotiating with [Senate Minority Leader] Chuck Schumer, and we'll see what happens."