President Trump speaks in the Oval Office on Wednesday. (Kevin Lamarque/Reuters)

President Trump revived his threat of a government shutdown Tuesday over the issues of immigration and border security, creating yet another headache for Republican leaders on Capitol Hill who have been marching forward with plans to avert a funding crisis before the November midterms.

“I don’t care what the political ramifications are, our immigration laws and border security have been a complete and total disaster for decades, and there is no way that the Democrats will allow it to be fixed without a Government Shutdown,” Trump said in a tweet Tuesday afternoon.

“Border Security is National Security, and National Security is the long-term viability of our Country,” he added. “A Government Shutdown is a very small price to pay for a safe and Prosperous America!”

The threat came one day after Senate Majority Leader Mitch McConnell (R-Ky.) told The Washington Post that he was confident that Congress could avoid a shutdown in the fall.

McConnell and House Speaker Paul D. Ryan (R-Wis.) have laid out a strategy to fund more than half of federal agencies by Sept. 30, punting some of the more contentious fights — such as money for Trump’s long-sought U.S.-Mexico border wall — to after the elections.

But the president’s conflicting signals — encouraging in private, hard-line in public — call into question whether the GOP leaders’ plan will succeed.

Speaking with reporters aboard Air Force One on Tuesday evening, White House spokesman Hogan Gidley said that he had spoken with Trump and that “what he wants is our immigration laws fixed.”

Trump also raised the prospect of a potential shutdown before or after the election, Gidley said.

“He said whether a shutdown happens before or after the elections, his focus is getting the problem fixed,” Gidley said. “It’s been a 40-year problem in the making. It’s been dumped on his plate. He wants to fix it.”

On Capitol Hill, McConnell and other Senate Republican leaders told reporters Tuesday afternoon that they are sticking to their plan to approve nine of the dozen spending bills on Congress’s plate by the end of August, putting them on track to have 90 percent of the government funded by the end of the fiscal year as long as Trump signs those bills into law.

But when it comes to wall money, GOP lawmakers have tried to make the case that threatening a shutdown was not a helpful tactic. Few Republicans think Trump will actually force a shutdown in September anyway, noting that Trump has repeatedly declined to put a time frame on when exactly he would force a confrontation over his border wall funding. 

“I think the president’s very serious about more money to fund the wall,” Senate Appropriations Committee Committee Chairman Richard C. Shelby (R-Ala.) said Tuesday afternoon. “I understand that. I’ve met with him on that. It’s mind-boggling to me that anybody would say well, we’re going to shut down the government if I don’t get my way.”

McConnell steered clear of criticizing Trump, saying that while he supports what the president is trying to achieve on the border wall, the Senate is working to resolve the issue through regular order.

“We’re trying to go through a normal appropriations process that prevents a big event at the end of the fiscal year, which has become all too common around here,” McConnell said. He added: “Hopefully we don’t get to that position at the end of the fiscal year.”

Trump’s latest shutdown threat comes after a tweet earlier Tuesday in which he seized on news reports of a higher murder rate in Mexico than previously reported to bolster his demands for border wall funding and other immigration measures.

“One of the reasons we need Great Border Security is that Mexico’s murder rate in 2017 increased by 27% to 31,174 people killed, a record!” Trump said. “The Democrats want Open Borders. I want Maximum Border Security and respect for ICE and our great Law Enforcement Professionals! @FoxNews”

His tweet referenced a report Monday by the Mexican National Institute of Statistics and Geography, which revised a previous homicide count of 25,339 for 2017. With the higher figure, the rate of homicides in Mexico was the highest since at least 1990.

The House allocated about $5 billion for funding Trump’s border wall and other related barriers along the southern border — an amount the White House has endorsed. The Senate is notably lower, at $1.6 billion. Those differing levels will also probably provoke a standoff later this year. 

“I’d like to try to match the House,” said Sen. Shelley Moore Capito (R-W.Va.), who leads the panel overseeing Homeland Security funding. But Republicans need help from Democrats to clear most bills in the Senate, and Capito noted that “I don’t know if we can compromise. We just haven’t gotten that far yet.”

John Wagner contributed to this report.