WASHINGTON – It was one of Donald Trump’s most-repeated campaign promises: Not only would he build a wall along the U.S. southern border – a “big, beautiful wall,” he boasted – he’d make Mexico pay for it.

That was then.

As president, Trump demands that Congress give him $5 billion as a down payment on the wall and threatens to shut down the government if he doesn’t get it.

“I am proud to shut down the government for border security,” he declared Tuesday during a finger-pointing, arm-waving, on-camera squabble with House Democratic Leader Nancy Pelosi and Senate Democratic Leader Charles Schumer in the Oval Office.

Whether Trump was bluffing or not, the battle over border funding has quickly become the major obstacle to getting a spending bill through Congress before next week’s deadline. A short-term spending bill expires at midnight Dec. 21, and parts of the government will run out of money and shut down unless lawmakers reach a consensus on a funding plan.

A government shutdown seems even more likely after Tuesday’s Oval Office spectacle. Democrats accused Trump of throwing a made-for-television temper tantrum but vowed they have no intention of putting up $5 billion for a border wall.

Trump’s insistence that Congress give him $5 billion to help pay for the wall is a departure from his vow throughout the 2016 presidential campaign – and even into his presidency – that Mexico would bear the cost.

“We all knew that wasn’t going to happen, but that was the promise,” Sen. Jeff Flake, R-Ariz., said Tuesday. “This notion that he’s having to fulfill his promise to get this amount of funding for a wall structure – it’s not a campaign promise that’s being kept there, it’s one that’s being broken.”

As a candidate, Trump “had a nasty habit of making a lot of fast promises – sweeping, huge, enormous false promises,” said Jesse Lee, spokesman for the political arm of the left-leaning Center for American Progress.

In this case, “it’s not just that it was broken promises – it was kind of a lie to begin with,” Lee said.

Trump insisted Thursday morning that Mexico would pay for the wall through the new U.S.-Mexico-Canada Agreement. The trade deal, which requires approval by Congress, is a revised version of the North American Free Trade Agreement, or NAFTA.

"I often stated, 'One way or the other, Mexico is going to pay for the Wall,' " he wrote on Twitter. "This has never changed. Our new deal with Mexico (and Canada), the USMCA, is so much better than the old, very costly & anti-USA NAFTA deal, that just by the money we save, MEXICO IS PAYING FOR THE WALL!"

On the day he launched his campaign for president, Trump vowed he would build a wall along the border with Mexico and Mexicans, not Americans, would foot the bill.

“Nobody builds walls better than me, believe me, and I’ll build them very inexpensively,” he told supporters during his campaign kickoff speech at Trump Tower on June 16, 2015. “I will build a great, great wall on our southern border. And I will have Mexico pay for that wall. Mark my words.”

Though he offered few details about how he’d force Mexico to pay for the wall, Trump made the same promise again and again.

“Mexico is going to pay – they know it – Mexico is going to pay for the wall, and that’s an easy one,” he told a crowd in Portland, Maine, on Aug. 4, 2016.

“Mexico will pay for the wall, OK, believe me, they will pay for the wall,” he promised at a campaign rally in Jacksonville, Florida, on Nov. 3, 2016, five days before the election.

Trump continued to make the same pledge after he became president, insisting May 29 at an event in Nashville that Mexico is “going to pay for the wall, and they’re going to enjoy it.”

No matter what Trump says, Mexico is not going to pay for the wall, said Arturo Sarukhan, who served six years as Mexico’s ambassador to the United States.

“Mexico and the U.S. have done – and can do – great things together, but the one thing Mexico will not be doing with the U.S. is building a wall along our common border,” Sarukhan said. “It’s a first-century solution to 21st-century challenges.”

Trump’s Oval Office spat with Pelosi and Schumer on Tuesday barely registered in Mexico, Sarukhan said, because “at this stage, Mexicans have become increasingly Teflon-coated to Trump's harangues that Mexico will pay for the wall.”

Thursday, Pelosi dismissed Trump's claim that Mexico would pay for the wall through the new trade deal.

“It doesn’t make any sense," she said. "Basically what he is saying: Any benefit that our economy might have from the revised trade agreement with Mexico and Canada would be spent on the wall instead of growing our economy, increasing paychecks for our workers.

“He doesn’t even have the trade agreement,” she said, because the deal hasn't been approved by Congress.

Trump keeps pushing the myth that Mexico will pay because he knows that failing to deliver on that promise would be a devastating political blow, given the importance his base places on immigration, Lee said.

“That’s why you see him going further and further down this desperate rabbit hole to try to salvage some semblance of ‘I kept that promise,’ ” Lee said.

“He set himself up for failure,” Lee said. “What his base liked about him was the idea that he was a winner. And he’s going to be a big loser on this.”

Contributing: Eliza Collins and The Associated Press

The Wall - Interactive map exploring U.S.-Mexico border

More:Trump says he would 'totally be willing' to shut down government over wall

More:Families still being separated months after Trump’s ‘zero tolerance’ policy reversed

More:Ghost of Shutdowns Past haunts latest talks to keep federal government open