President Donald Trump on Monday renewed threats to shut down the government if Congress doesn’t approve billions of dollars for border security, even as Republican leaders on Capitol Hill implored Trump to avoid budget brinkmanship before the midterm elections.

Trump wants at least $5 billion next fiscal year in additional funding to construct a wall along the U.S.-Mexico border. Because Democrats object, congressional Republicans are unlikely to meet Trump’s demand before the start of fiscal 2019 on Oct. 1.

House Speaker Paul Ryan, R-Wis.

House Speaker Paul Ryan, R-Wis., and Senate Majority Leader Mitch McConnell, R-Ky., met with Trump at the White House last week to discuss their appropriations strategy. Both lawmakers emerged from that meeting believing Trump had agreed to sign as many spending bills as Congress could send him, and that he would also accept stopgap homeland security funding to delay the fight over the border until after the election, according to congressional aides.

While Trump’s high-voltage rhetoric has rattled some Republican leaders, most believe – or are at least hopeful – this is just Trump’s now-familiar negotiating style: Initially demand far more than he’s ultimately willing to accept.

But like Trump, some Republican rank-and-file lawmakers are itching for a political fight with Democrats over immigration and border security, believing such a battle would energize conservative voters to turn out in the November elections, where the GOP’s House and Senate majorities are at stake.

The president joined the fray with a tweet Sunday: “I would be willing to ‘shut down’ government if the Democrats do not give us the votes for Border Security, which includes the Wall!”

He reiterated that threat Monday during a news conference at the White House with Italian Prime Minister Giuseppe Conte. “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.

Congress is racing to approve the 12 annual spending bills that fund the federal government – everything from food inspection and environmental protection to transportation, education and defense. By Labor Day, the Senate hopes to have passed nine appropriations bills, while the House has already approved six. That’s a big change for Congress, which hasn’t enacted all 12 spending bills on time since fiscal 1997.

Still, the one appropriations bill unlikely to be approved by October is for the Department of Homeland Security, which has jurisdiction over border security. Congress in the current fiscal year approved $1.6 billion to begin construction of a barrier along portions of the U.S.-Mexico border. For fiscal 2019, the House’s draft bill would provide an additional $5 billion for wall construction while the Senate’s homeland security funding bill would provide another $1.6 billion.

To avoid a partial shutdown at the Department of Homeland Security, Trump would be forced to sign a stopgap funding bill called a “continuing resolution.” Designed to be short term, that bill would effectively kick the can down the road by extending current department funding levels, likely to December – after the midterm elections.

Trump could refuse to sign a continuing resolution to try to leverage Congress to send him more border funding. But Democrats’ objection to that funding and Trump’s refusal to sign a temporary funding bill would lead to a partial government shutdown.

Most congressional Republicans believe the political consequences of even a partial shutdown only four weeks before the midterm elections would be cataclysmic. A shutdown also could impact the pending Senate confirmation of Brett Kavanaugh, Trump’s nominee to the Supreme Court.

McConnell has said he wants a vote on Kavanaugh before the court’s fall term begins in early October. But if that timetable slips, senators could be voting on Kavanaugh while simultaneously dealing with a shutdown. Even if Kavanaugh is confirmed in September, Republican leaders fear any political momentum could be immediately drained if days later the government partially closes amid a fight over border security.

For now, congressional Republicans plan to send Trump as many spending bills as they can approve and hope that Trump’s shutdown threats – to the extent they’re real – are focused on a fight with Democrats after the elections, not before.