Bridgewater, N.J. • President Donald Trump said Sunday that he would consider shutting down the government if Democrats refuse to vote for his immigration proposals, including a U.S.-Mexico border wall.

Republicans, trying to protect their majority in Congress, are playing down the chance of a shutdown as the November election nears. Trump, however, isn't backing away from the idea.

"I would be willing to 'shut down' government if the Democrats do not give us the votes for Border Security, which includes the Wall!" Trump tweeted. "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!" Trump said.

Trump returned to the idea of shutting down the government over the border wall after meeting at the White House last week with House Speaker Paul Ryan, R-Wis., and Senate Majority Leader Mitch McConnell, R-Ky., to discuss the fall legislative agenda.

McConnell, asked about a shutdown during a Kentucky radio interview, said it was not going to happen. He did acknowledge, however, that the border funding issue was unlikely to be resolved before the midterm elections.

Ryan said after the meeting: "The president's willing to be patient to make sure that we get what we need so that we can get that done." He added that money for the wall was "not a question of if, it's a question of when."

Trump campaigned on the promise of building a border wall to deter illegal immigration and making Mexico pay for it. Mexico has refused.

Congress has given the president some wall funding but far from the $25 billion he has requested. Trump wants changes to legal immigration, including scrapping a visa lottery program. In addition, he wants to end the practice of releasing immigrants caught entering the country illegally on the condition that they show up for court hearings.

Trump has also demanded that the U.S. shift to an immigration system based more on merit and less on family ties.

Democrats and some Republicans have objected to some of the changes Trump seeks.

The federal budget year ends Sept. 30, and lawmakers will spend much of August in their states campaigning for re-election. The House is now in recess, returning after Labor Day. The Senate remains in session and is set to go on break the week of Aug. 6 before returning for the rest of the month. McConnell canceled most of the Senate's recess to give senators time to work on the annual spending bills that fund government operations.

Both chambers will have a short window to approve a spending bill before government funding expires.

Trump would be taking a political risk if he does allow most government functions to lapse on Oct. 1 — the first day of the new budget year — roughly a month before the Nov. 6 elections, when Republican control of both the House and Senate is at stake.

Some Republican lawmakers doubted the government would be forced to shut down.

Sen. Ron Johnson, R-Wis., chairman of the Senate Homeland Security and Governmental Affairs Committee, said on CBS' "Face the Nation" that he didn't think shutting down the government just before the elections would be helpful "so let's try and avoid it."

Rep. Steve Stivers, R-Ohio, chairman of the National Republican Congressional Committee, the campaign arm for GOP House candidates, agreed.

"I think we're going to make sure we keep the government open, but we're going to get better policies on immigration," he said on ABC's "This Week." ''The president, I think, wants us to have policies that work for America and work for Americans, and I think that's what we are going to move forward with."

House Republicans released a spending bill this month that provides $5 billion next year to build Trump's wall, a plan he supports.

Democrats have long opposed financing Trump's wall but lack the votes by themselves to block House approval of that amount. They do, however, have the strength to derail legislation in the closely divided Senate.

The $5 billion is well above the $1.6 billion in the Senate version of the bill, which would finance the Department of Homeland Security. The higher amount matches what Trump has privately sought in conversations with Republican lawmakers, according to a GOP congressional aide who wasn't authorized to publicly talk about private discussions and spoke on condition of anonymity.

At the White House meeting last week, Trump, Ryan and McConnell agreed that Congress is on track to enact more than half of federal spending before the new budget year begins Oct. 1, but that DHS funding, including the border wall money, doesn't have to be settled before then, according to a person familiar with the meeting who was not authorized to discuss it publicly and spoke on condition of anonymity.

Two leading Democrats — Reps. Nita Lowey of New York and California's Lucille Roybal-Allard — called the $5 billion a waste that "only further enables this administration's obsession with cruel attacks on immigrants."

Trump also tweeted on Sunday that there are "consequences when people cross our Border illegally" and claimed many who do so are "using children for their own sinister purposes."

Trump's tweet came several days after the government said more than 1,800 children separated at the U.S.-Mexico border under Trump's "zero-tolerance" immigration policy have been reunited with parents and sponsors. A federal judge had ordered the reunions to be completed by last Thursday, but hundreds of children remain separated. The administration says some of their parents have criminal histories.

“Please understand, there are consequences when people cross our Border illegally, whether they have children or not - and many are just using children for their own sinister purposes,” Trump said.