Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The White House on Thursday reiterated its willingness to risk shutting down the government to obtain funding for President Donald Trump's long-promised wall between the United States and Mexico.

"This is something the president is committed to," White House Press Secretary Sarah Huckabee Sanders said of Trump’s dedication to building the wall. Trump has repeatedly told supporters that Mexico would pay for the wall, a key point of his hardline immigration pitch to voters.

"He’s committed to protecting American lives and doing that through the border wall is something that’s important, it’s a priority and we are moving forward with it," Sanders said.

Sanders' comments came just hours after a senior administration official told NBC News that Trump was "serious" about his government shutdown threat, which marked an escalation from the commander-in-chief’s warning earlier this week.

The Trump administration official told NBC News that such a showdown with Congress, over funding for construction of the border wall, could come in September when lawmakers return from their August break or after the passage of a short-term spending bill in December.

The official also said Trump could back a compromise deal with Congress that would fund the government for three to four months without paying for the wall. The president would then demand border wall funding in an “omnibus spending bill,” a long-term measure that includes funding for a number of priorities.

A Sept. 30 deadline is approaching to continue funding the government. If Congress failed to pass a funding resolution, the government would shut down.

On Tuesday night, at a campaign rally in Phoenix, Trump threatened a shutdown if his wall along the Mexico border isn’t funded by Congress, telling the crowd, "If we have to close down our government, we're building that wall."

"We're going to have our wall. The American people voted for immigration control. We're going to get that wall," Trump said to cheers of "Build the wall! Build the wall!"

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump aide Kellyanne Conway echoed her boss, telling Fox News Thursday morning that Trump was "steadfastly committed" to building the wall, and that he expects the funding to do it.

"Anybody who’s surprised by that has not been paying attention for over two years," Conway said. "So he’s telling Congress he’s building the wall, he expects the funding, and it’s up to them to work collaboratively. We hope they do."

Trump himself amped up his attacks on GOP leaders in Congress on Thursday, charging that they had ignored his instructions on debt ceiling legislation, which he said has now created a "mess."

“I requested that Mitch M & Paul R tie the Debt Ceiling legislation into the popular V.A. Bill (which just passed) for easy approval. They…..didn't do it so now we have a big deal with Dems holding them up (as usual) on Debt Ceiling approval. Could have been so easy-now a mess!” he wrote in a pair of posts, calling out House Speaker Paul Ryan, R-Wis., and Senate Majority Leader Mitch McConnell, R-Ky.

I requested that Mitch M & Paul R tie the Debt Ceiling legislation into the popular V.A. Bill (which just passed) for easy approval. They... — Donald J. Trump (@realDonaldTrump) August 24, 2017

...didn't do it so now we have a big deal with Dems holding them up (as usual) on Debt Ceiling approval. Could have been so easy-now a mess! — Donald J. Trump (@realDonaldTrump) August 24, 2017

The shutdown debate is separate from the need to raise the debt ceiling. If Congress fails to lift the ceiling, the government would be in default on its debt, which could cause a widespread calamity in the credit markets and shake the financial world. But that in itself would not shut down the government, an event that would only happen if Congress fails to reach agreement on appropriations bills before the next fiscal year begins on Oct. 1.

Trump singled out McConnell again in another post over the Senate's failure to pass health care legislation.

"The only problem I have with Mitch McConnell is that, after hearing Repeal & Replace for 7 years, he failed! That should NEVER have happened!" Trump tweeted.

The only problem I have with Mitch McConnell is that, after hearing Repeal & Replace for 7 years, he failed!That should NEVER have happened! — Donald J. Trump (@realDonaldTrump) August 24, 2017

Even though a shutdown appears unlikely with the GOP in control of both chambers of Congress, Republicans believe they would suffer severe repercussions at the ballot box in 2018 if the government were forced to close its doors.

Republican leaders in Congress have repeatedly pushed back on the idea of a shutdown.

"I don't think a government shutdown is necessary, and I don't think most people want to see a government shutdown, ourselves included," Ryan said Wednesday.

And at a town hall event Thursday with employees of a Boeing plant in Everett, Wash., Ryan vowed Congress “will pass legislation to make sure we pay our debts and we will not hit the debt ceiling.”

“I am not worried that's going to get done, because it is gonna get done,” Ryan said.

McConnell said Monday there was "zero chance, no chance" Congress would not raise the debt ceiling.

Even Sen. Jeff Flake, R-Ariz., who supports enhanced border security, said there was no need for a shutdown.

"We don’t need a government shutdown. That never ends well and we don’t save money doing it," Flake told Fox News Thursday. "And with regard to border security, I think the president and all of us share the same goal."

Visitors to the Jefferson Memorial are turned away by barricades due to the government shutdown in Washington on Oct. 1, 2013. Karen Bleier / AFP - Getty Images file

The last federal government shutdown was a partial one in 2013, after lawmakers reached an impasse on a bill to finance the government when the Democratic-led Senate rejected measures passed by the Republican-led House that would have delayed key portions of the Affordable Care Act while extending funding for a few weeks.

That shutdown, which lasted for 16 days, resulted in hundreds of thousands of federal employees being furloughed, tourist destinations closing and services including food assistance and IRS audits being disrupted.

Adam Edelman reported from New York and Peter Alexander from Washington, D.C.