For months, the U.S. has been barreling toward a debt limit crisis. Democrats refused to negotiate, and Republicans insisted on a deal stocked with right-wing policy priorities. It was unclear how, or whether, they would avert catastrophe.

This week, the atmosphere in Washington shifted. The chances of getting a deal done now seem higher. Why? Because both sides budged: Democrats are negotiating, and more Republicans have suggested that they are willing to compromise. Speaker Kevin McCarthy, the Republican leader, said yesterday for the first time that he saw a “path that we could come to an agreement.”

“That was a marked change in attitude from earlier in the week, when McCarthy was very pessimistic,” my colleague Carl Hulse, The Times’s chief Washington correspondent, told me.

The stakes are still high. If Congress does not increase the debt ceiling — the limit on money that the U.S. can borrow — the government may run out of money as early as June 1. It would no longer be able to pay its bills, potentially defaulting on its debts. That could send the financial markets, and the economy, into chaos (as this newsletter has detailed).

Today’s newsletter will explain what changed this week and why there is greater optimism about a deal.

Over the past few months, President Biden and congressional Democrats declined to negotiate over the debt limit. They characterized Republicans as holding the country hostage, threatening to wreck the economy to get their way on policy. Democrats hoped their stance would push Republicans to increase the debt limit without attaching conditions.

But then the Treasury Department announced this month that the U.S. could hit its debt limit in just weeks. And House Republicans passed a debt limit bill with right-wing policy priorities, including sweeping but unspecified spending cuts, rollbacks of Biden policies and work requirements for Medicaid, food stamps and welfare benefits.

Democrats blinked. Last week and this week, the White House hosted congressional leaders to discuss the debt limit. This week, they had a small breakthrough: Biden agreed to have his staff meet directly with McCarthy’s aides to hash out a deal. By cutting out other congressional leaders, Biden and McCarthy are more likely to reach a compromise quickly.

On the Republican side, it was always hard to see what kind of deal McCarthy could bring forward that would placate different House Republican factions, particularly on the far right. After all, it took 15 ballots for Republicans to finally vote McCarthy in as speaker. He has barely held his caucus together since. And McCarthy indicated he would push for a debt-limit increase that includes everything in the House Republican bill.

As the debt limit deadline drew closer, and as Democrats started to negotiate, Republicans softened their stance. Moderate Republicans have said they are willing to compromise. “We know we’re not going to get everything,” Representative Don Bacon of Nebraska told Politico. And McCarthy’s staff is, after all, meeting with Biden’s in the hopes of reaching a deal.

What could that deal look like? It will probably include some limits on federal spending, a clawback of unused Covid relief funds, changes to speed up permits for energy infrastructure and, potentially, new work requirements on some federal benefits. That would amount to “a fairly normal spending and budget deal, typical of a divided government, with a debt-limit increase attached,” Carl said.

That deal would not fully satisfy House Republicans’ right flank. But their votes would not be needed to pass a bill if moderate Republicans joined with Democrats.

Of course, any potential deal could still collapse.

One current sticking point is new requirements that would force recipients of government benefits to prove that they have a job or are trying to find work. Republicans want to impose those conditions on Medicaid, food stamps and welfare. Biden has indicated that he is open to doing so for food stamps and welfare, both of which already have some work requirements, but not for Medicaid, which has none.

Republicans further to the right say that a deal needs to include work requirements for all three programs. Members of the right-wing Freedom Caucus have called on McCarthy to stop negotiating with Biden until the Senate passes the House Republican bill with such conditions. More liberal Democrats say that they will oppose any new work requirements. “I cannot in good conscience support a debt ceiling proposal that pushes people into poverty,” said Senator John Fetterman, Democrat of Pennsylvania.

If they come together in opposition, the flanks on the left and right could blow up a deal, my colleague Catie Edmondson, who covers Congress, wrote.

Congress could still pass a bill without those flanks, if moderate lawmakers from both parties vote for it. But there are limits to how far the president and speaker will go without the full support of their parties. Biden does not want to aggravate liberal Democrats whom he likely needs for future votes. And McCarthy wants to keep his job; if far-right lawmakers feel betrayed, they could call a vote to oust him as speaker.

Lives Lived: The real estate tycoon Sam Zell acquired The Chicago Tribune, The Los Angeles Times and other newspapers in a criticized leveraged buyout of their parent company. Zell died at 81.

Withdrawn: Rafael Nadal, the Spanish tennis star, will miss the French Open because of an injury.

N.B.A. playoffs: The Denver Nuggets are up 2-0 over the Los Angeles Lakers in the Western Conference finals.

“Not forgotten”: Brittney Griner is back playing in the W.N.B.A., five months after leaving a Russian prison. While inside, these letters sustained her.

Surprise contender: The little-known Eric Cole leads the P.G.A. Championship after Day 1.

A digital imaging project has produced a digital twin of the Titanic, showing the wreckage with new clarity. Researchers mapped every millimeter of the shipwreck more than two miles below the surface. New details have already emerged, like a lifeboat that couldn’t be deployed because of a jammed piece of metal.

The pangrams from yesterday’s Spelling Bee were blurring, bullring, burbling and burgling. Here are today’s puzzle and the Bee Buddy, which helps you find remaining words.