President Trump on Tuesday said that he is prepared to shut down the government if congressional lawmakers don’t present a spending bill that will pay for a U.S.-Mexico border wall.

“Believe me, if we have to close down our government, we're building that wall,” Trump said at a campaign rally in Phoenix, where the crowd responded: “Build that wall. Build that wall. Build that wall.”

The Republican-controlled Congress has yet to pass a spending resolution to keep the government fully operational past Sept. 30.

And members will have just a few weeks after returning from August recess to complete the task and avoid a politically unpopular shutdown.

The House in late-July passed a spending bill that included $1.6 billion to build the wall, which has an estimated price tag of $12 billion.

However, Republicans have only a slight Senate majority, which means Democrats could demand that any budget resolution include no money for the wall, in exchange for their votes to pass the resolution and keep open the government.

(Voters bashed Republicans in 2013 for refusing to fund ObamaCare in a spending resolution that resulted in a 16-day shutdown.)

The idea that Trump would play hardball with Congress to get money for the wall to stem the flow of illegal immigrants and fulfill a major campaign promise has been an undercurrent in Washington for months, as the Oct. 1 deadline nears.

However, the idea resurfaced in recent weeks amid reports about the eventual ouster of White House political strategist Steven Bannon and how in his final weeks he urged the president to threaten the veto.

Senate Democrats estimate the wall could cost as much as $70 billion, and at least three have said they will not support a so-called continuing resolution, a placeholder for a full budget, if it includes money for the wall.

“If the president pursues this path, against the wishes of both Republicans and Democrats, as well as the majority of the American people, he will be heading towards a government shutdown, which nobody will like and which won’t accomplish anything,” Senate Minority Leader Chuck Schumer, D-N.Y., said Wednesday.

Rep. Trent Franks, R-Ariz., said Wednesday morning on Fox News' "America's Newsroom": "There would never be any discussion about shutting down the government if it were not for the fact Democrats in the Senate … take this process hostage through the filibuster.”

Trump also said Tuesday night: “Democrats would like us not to do it. Let me be very clear to Democrats in Congress who oppose a border wall and stand in the way of border security: You are putting all of America's safety at risk. You're doing that.”