WASHINGTON — Republicans anxious about keeping control of Congress think it's a bad idea, but President Donald Trump still says he's willing to close the government over border security issues, including money he wants to build a promised U.S.-Mexico border wall.

"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 Sunday. "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 after a meeting at the White House last week with House Speaker Paul Ryan, R-Wis., and Senate Majority Leader Mitch McConnell, R-Ky., where they were said to have agreed on the way forward on government funding for the budget year that starts Oct. 1.

McConnell told a radio interviewer last week that a shutdown so close to the Nov. 6 midterm elections won't happen. McConnell acknowledged, however, that the border funding issue in particular was unlikely to be resolved before the balloting.

Ryan said on Capitol Hill 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."

The White House did not immediately respond to request for comment on what may have changed since the meeting.

Trump has pledged to campaign aggressively, starting after Labor Day, to help Republicans retain control of the House and Senate, but GOP lawmakers don't appear to be rallying to his side on this not-so-new idea.

Sen. Ron Johnson, R-Wis., chairman of the Senate Homeland Security and Governmental Affairs Committee, said Sunday on CBS' "Face the Nation" that it would be unhelpful to shut down the government just before elections "so let's try and avoid it."

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

Trump has gotten some wall money from Congress, and likely will get more, though the total is short of the $25 billion he has requested.

He also wants changes to legal immigration, including scrapping a visa lottery program. In addition, Trump wants to end the practice of releasing immigrants caught entering the country illegally on the condition that they show up for court hearings, along with shifting the U.S. immigration system to one based more on individual merit and less on family ties. Democrats and some Republicans have objected to those proposals.

"The bill the president is describing only got 39 votes on the Senate floor. He should learn from his mistakes," Senate Minority Leader Chuck Schumer, D-N.Y., responded Monday through a spokesman.

Both chambers will have a short window to act before government funding expires at midnight Sept. 30.

The House is in recess and won't return until after Labor Day. The Senate will stay in session for most of August, except for a weeklong break scheduled to begin Aug. 6. McConnell canceled most of his chamber's recess to give senators time to work on the annual spending bills.

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

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 don't have enough votes by themselves to block House approval of that amount, but they do 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 a bill funding 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, 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 insisted on condition of anonymity.