The budget crisis that threatened to shut down the federal government next week may have been averted, at least in the short term. House Speaker John Boehner’s surprise announcement Friday that he would resign at the end of October significantly decreased the odds of a government shutdown, experts told the Washington Post.

According to the Post:

The shocking move, first reported by The New York Times, means there’s unlikely to be a government shutdown next week. Following Boehner’s announcement, House Republicans said there was agreement to pass a clean spending bill to avert a government shutdown. Several members of the Freedom Caucus, the conservative group which led the revolt against Boehner’s leadership, said they will now support the spending bill without demands to defund Planned Parenthood attached to it.

Conservative Republicans have long had it in for Boehner, R-Ohio, who they felt was too accommodating of Democrats and the Obama Administration. The so-called Freedom Caucus had threatened to shut down the government if, among other things, Congress failed to cut funding for Planned Parenthood—something Democrats and the White House promised to block.

Tea party Republicans had threatened to oust Boehner if he failed to help them, but his unexpected departure removes that leverage.

Steve Bell, director of economic policy at the Bipartisan Policy Center, told the Post, “[Boehner] took a bullet for the country.”

Market Watch reported that Boehner’s departure at the end of October will give him plenty of time to negotiate a deal with Democrats that will avert a shutdown or keep it short:

“He will be free to prevent a government shutdown, as he has said he wants to do, by doing what he’s done numerous times, and that’s to pass a bill with [Democratic Minority Leader Nancy] Pelosi’s help,” said analyst Omar Sharif at SG Americas Security. “After that, he can ride off into the sunset.”

Even if Boehner manages to craft a deal, however, budget battles are far from over. As Market Watch notes: “A more aggressive Republican-led Congress could also challenge the White House over a bill to increase the borrowing limit of the federal government.”