By Josh Dawsey and Mike DeBonis March 27 at 12:39 PM

President Trump frequently said Mexico would pay for a wall along the southern border as he sought the presidency in 2016. Now, he is privately pushing the U.S. military to fund construction of his signature project.

Trump, who told advisers he was spurned in a large spending bill last week when lawmakers appropriated only $1.6 billion for the border wall, has begun suggesting that the Pentagon could fund the sprawling construction, citing a “national security” risk.

After floating the notion to several advisers last week, he told House Speaker Paul D. Ryan (R-Wis.) that the military should pay for the wall, according to three people familiar with the meeting Wednesday in the White House residence. Ryan offered little reaction to the notion, these people said, but senior Capitol Hill officials later said it was an unlikely prospect.

The individuals spoke on the condition of anonymity to talk freely about private discussions.

In another such interaction with senior aides last week, Trump noted that the Defense Department was getting so much money as part of the $1.3 trillion spending package that the Pentagon could surely afford the border wall, two White House officials said. The Pentagon received about $700 billion in the spending package, which Trump repeatedly lauded as “historic.”

Meanwhile, the $1.6 billion in the bill for some fencing and levees on the border not only fell far short of the $25 billion that Trump was seeking, but it came with tight restrictions on how the money can be spent.

A White House spokesman declined to comment.

“Build WALL through M!” Trump recently wrote on Twitter. Two advisers said that “M” stood for “military.”

It would be unlikely for the military to fund the wall, according to White House and Defense Department officials. The president has suggested to Defense Secretary Jim Mattis that his department, instead of the Department of Homeland Security, could fund the construction, two Trump advisers said.

The Pentagon has plenty of money, but reprogramming it for a wall would require votes in Congress that the president does not seem to have. Taking money from the current 2018 budget for the wall would require an act of Congress, said a senior Pentagon official.

To find the money in the 2019 defense budget, Trump would have to submit a budget amendment that would still require 60 votes in the Senate, the official said.

Democrats in Congress would probably chafe at military spending going to the construction of a border wall, and military officials may also blanch, White House advisers said.

“First Mexico was supposed to pay for it, then U.S. taxpayers, and now our men and women in uniform? This would be a blatant misuse of military funds and tied up in court for years. Secretary Mattis ought not bother and instead use the money to help our troops, rather than advance the president’s political fantasies,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said in a statement to The Washington Post.

Trump has grown frustrated watching constant TV criticism of the spending deal he signed last week and is determined to find a new way to fund the wall, several advisers said, privately grousing that his political supporters could become disenchanted without progress. After a recent trip to see prototypes of the wall in California, Trump has grown more animated by the issue, advisers said.

The president’s comments raising the possibility of using Pentagon funds to build the wall came after the collapse of negotiations with Democrats to secure $25 billion in long-term wall funding in exchange for protections for young immigrants at risk for deportation because of Trump’s cancellation of the Deferred Action for Childhood Arrivals (DACA) program.

The White House offered three years of protections for DACA recipients, according to multiple congressional aides, but Democrats demanded protections for a larger group of “dreamers,” including those who never applied for or are ineligible for DACA. The negotiations fell apart before the $1.3 trillion spending bill was drafted and passed last week.

The urgency to strike a deal reflected the growing sense that the spending bill represented the last chance for the Trump administration to secure substantial wall funding, at least in his first term. Top Republicans believe it is all but certain that Democrats will gain House seats in November’s midterm elections — and perhaps take the majority — greatly enhancing their bargaining position in future spending negotiations.

Only $641 million is earmarked for new primary fencing in areas that currently have no barriers, and the money can be spent only on “operationally effective designs” that were already deployed as of last May. That means the prototype designs the Trump administration is exploring cannot be built.