Updated Monday at 2:25 p.m.: Revised to include Trump comments at news conference Monday and fresh criticism.

WASHINGTON — Unhappy at congressional foot-dragging over his border wall demands, President Donald Trump insisted Monday that he's not kidding when he threatens to trigger a government shutdown if Congress refuses to fund the project.

"If we don't get border security after many, many years of talk within the United States, I would have no problem doing a shutdown," Trump said, though he left wiggle room by indicating he would accept less, for now, than the tens of billions needed. "I have no red line, unlike President Obama. I just want great border security."

He issued the same threat Sunday morning by Twitter, and defended his stance Monday at a joint news conference with the Italian prime minister.

The House Appropriations Committee included $5 billion for the wall last week in a spending bill. The Senate has proposed $1.6 billion — a fraction of the $25 billion the White House wants.

Trump vented his impatience in a threat issued via Twitter on Sunday morning, during a weekend retreat at his golf club in Bedminster, N.J.

Notably, he aimed his wrath at Democrats, saying he would be willing to shut down the government "if the Democrats do not give us the votes for Border Security, which includes the Wall!"

But it's Republicans who hold a firm grip on the House — at least through the November midterm elections — and also control the Senate, though by only two votes. And it was the Republican leaders of those chambers, Speaker Paul Ryan and Senate Majority Leader Mitch McConnell, who outlined their plans for Trump on Wednesday to deal with less controversial spending bills first, and leave a fight over wall funding for later.

I would be willing to “shut down” government if the Democrats do not give us the votes for Border Security, which includes the Wall! Must get rid of Lottery, Catch & Release etc. and finally go to system of Immigration based on MERIT! We need great people coming into our Country! — Donald J. Trump (@realDonaldTrump) July 29, 2018

Stumping in Pecos, Texas, on Monday afternoon, Rep. Beto O'Rourke - who is challenging Sen. Ted Cruz - denounced Trump's threat when a voter asked about the possibility of a shutdown over the border wall.

"We have the lowest northbound apprehensions since 1971," he said, calling it foolish to build "a wall that we don't need, that will take our national treasure at a time when we are $21 trillion in debt already."

McConnell told a Kentucky radio station on Friday that a fight over wall funding will "probably" wait until after the midterm elections.

"Probably, and that's something we do have a disagreement on," he said.

Ryan said Thursday that he was in no hurry to push the fight over wall funding, and neither was Trump — though the president's tweet on Sunday seemed to contradict that.

"The president's willing to be patient to make sure that we get what we need so we can that done," Ryan told reporters Thursday. In a signal of reassurance to the president, he added that funding the wall was "not a question of if. It's a question of when."

Sen. Tim Kaine of Virginia, the Democrats' 2016 nominee for vice president, mocked Trump as "President Shutdown" and accused him of playing a game that puts the U.S. economy at risk.

President Shutdown is at it again - how many times will he threaten to shut down the government—putting Virginia’s and our nation’s economy at risk, as well as the livelihoods of thousands of federal workers—before he realizes this is not a game? https://t.co/5vQz3f6vBS — Tim Kaine (@timkaine) July 29, 2018

Democrats are hoping for a wave in November that lets them take control of the House, and they overwhelmingly reject the idea of a vast border wall, calling it wasteful, ineffective and offensive to Mexico, a key trading partner.

Trump insists that it's needed to keep out drugs, criminals and migrants trying to enter the United States illegally.

Congress must adopt an annual budget by Sept. 30. Stopgap measures can keep the government open beyond then. After Election Day, Republicans will know if they're losing their majorities. A lame duck Congress could address wall funding, at risk of public backlash.

But failing to address Trump's demands also entails some risk, and the president's latest threat suggests he's willing to engage in brinkmanship.

Stan Collender, a longtime congressional budget expert, recently put the risk of a shutdown in October at 60 percent. Sunday morning, he took a fresh look in light of Trump's latest tweet and decided the risk remains substantial — even though Trump had apparently agreed to go along with the Ryan-McConnell approach just four days earlier.

"Trump is using the threat of a shutdown to raise the immigration issue with his base," Collender wrote.

Trump's incentive to rally the base, even if it angers GOP congressional leaders and alienates other voters, is intense ahead of the midterms. He is deeply unpopular beyond the base. Democrats are eyeing a House takeover. Dozens of GOP incumbents retiring.

Second, Collender wrote Sunday, by pointing blame at Democrats for blocking the border wall, Trump is telling "the congressional GOP leadership that the shutdown they're desperate to avoid is less important to him than the wall."

Trump also threatened to shut down the government in February if Congress refused to come up with enough border wall funding.

Congress called the bluff, providing only a fraction of the funds Trump sought. The White House saved face by arguing that it would not have been able to spend more in the current fiscal year anyway, as planning and prototype development and testing continued.

During the 2016 and throughout his presidency, Trump has vowed both to build a border wall and to make Mexico pay for it. He has yet to provide a plan to wrest such compensation and Mexico's president and president-elect both reject the notion as a nonstarter.

Reps. Nita Lowey of New York and Lucille Roybal-Allard of California, senior Democrats on the spending committee, blasted the Homeland Security appropriations bill and the wall funding it would provide.

"The inclusion of $5 billion for President Trump's border wall in House Republicans' Homeland Security bill is an extreme example of wasteful spending prompted by a seeming need to cater to the whims of President Trump," they said in a joint statement. "After the shame of the Trump family separation policy, this funding only further enables this administration's obsession with cruel attacks on immigrants and their families."