Six weary figures rose from their chairs early Saturday morning, their expressions telegraphing the conclusion to the N.B.A.’s five-month labor crisis: Basketball is back in business, with a new labor deal that heavily favors the owners, despite some last-minute concessions.

The league wanted an overhaul of its $4-billion-a-year enterprise, and it got it, with a nearly $300 million annual reduction in player salaries and a matrix of new restrictions on contracts and team payrolls. The changes mean a $3 billion gain for the owners over the life of the 10-year deal.

Before finally agreeing to those sacrifices, the players’ negotiators won a handful of concessions that will allow the richest teams to keep spending on players, ensuring a more competitive free-agent market.

A truncated 66-game schedule will begin Christmas Day with three nationally televised games. For that, officials on both sides were grateful as they announced a resolution at 3:40 a.m., on the 149th day of the lockout, after a final 15-hour bargaining session at law offices in Midtown Manhattan.

A little more than two weeks ago, the talks appeared dead. A federal mediator had intervened twice without success. The commissioner, David Stern, had tried threats and ultimatums before declaring negotiations over on Nov. 10.

Four days later, the players dissolved their union and filed a federal antitrust lawsuit. Mr. Stern promptly forecast a “nuclear winter” for the league, amid widespread predictions that the 2011-12 season would be canceled.

The deal was forged by the possibility of a cancellation, the feared loss of billions of dollars for the league and its players, and, perhaps, by the uncertainty created by the looming legal battle.

The new agreement calls for a 50-50 split of basketball-related revenues between the owners and the players, about $2 billion for each side in current terms. There is a possibility that the players can make as much as 51 percent or as little as 49 percent, depending on whether the league exceeds or falls short of projections. The players had been earning 57 percent.

The loss of 16 regular-season games and the preseason cost the owners and players an estimated $400 million each. The parties had already resolved the biggest issues, including the $300 million salary reduction, weeks ago, but were hung up on fairly minor details — mostly rules restricting the top-spending teams from adding players. With a 66-game schedule in reach, everyone finally resolved that those items were not worth sacrificing a season and alienating fans and sponsors. The normal N.B.A. regular season is 82 games.

“For myself, it’s great to be a part of this particular moment, in terms of giving our fans what it is that they so badly wanted and want to see,” said Derek Fisher, the president of the players union.

Mr. Fisher did not smile as he said it, appearing more relieved than happy.

Billy Hunter, the longtime head of the players union, sat stoically next to him. No one on the players’ side praised the agreement.

League officials achieved their two broadest goals: reduced costs and a system that evens the playing field between the richest and poorest teams. The reduction in player salaries should offset the N.B.A.’s reported $300 million in annual losses, and provide a savings of about $3 billion over the 10-year agreement. Each side has an option to terminate the deal after six years. In addition to the significant pay cut for players, the deal includes shorter contracts, smaller raises and a more punitive tax system to rein in the top-spending teams.

“I think it will largely prevent the high-spending teams from competing in the free-agency market in a way that they have been able to in the past,” Mr. Silver said, adding, “We feel ultimately it will give fans in every community hope that their team can compete for championships.”

The Knicks generated an estimated $226 million in revenue last season, while the Milwaukee Bucks earned $92 million, according to Forbes. The payroll gap is also striking, with the Mavericks spending nearly $90 million on their roster and the Sacramento Kings $45 million. The league is developing a new revenue-sharing plan to help boost the small-market teams.

The average N.B.A. salary is $5 million, with a minimum salary around $500,000 and with stars making $15 million or more. Kobe Bryant of the Los Angeles Lakers earns a league-high $25 million.

Training camps will open on Dec. 9. Unsigned players will be permitted to sign contracts that day, setting up a chaotic two-week dash toward the 2011-12 season. The three Christmas games are likely to be the ones that were already on the schedule: The Knicks will host the Boston Celtics to open the day, followed by an N.B.A. finals rematch, with the Miami Heat visiting the defending champion Dallas Mavericks. The Chicago Bulls will visit the Lakers in the finale.

The rest of the schedule will be reconstructed and released in the coming days. The season will begin eight weeks later than originally scheduled and will be extended into late April, pushing back the playoffs and the finals by a week. Teams will have to play, on average, about two more games a month and sometimes on three consecutive nights — which has not been done since the lockout-shortened 1999 season. That season, the shortest in the modern era, is often regarded with an asterisk, and was marked by sloppy play and out-of-shape players.

The 2011-12 season may need only a quarter-asterisk. Every team will play 48 in-conference games, just four fewer than normal. But teams will play only 18 out-of-conference games, meaning not every team will visit every city. So fans in Memphis, for example, might not see LeBron James this season. Conversely, a struggling team like Detroit might avoid facing the Mavericks. Concessionaires and businesses near arenas that depend on the N.B.A. will get a partial reprieve.

There is much work to be done before the basketballs hit the court, and before Bryant, Kevin Durant and Dirk Nowitzki can light up arenas again.

Negotiators must still settle a myriad of so-called B-list issues, including drug testing, the age limit and use of the Development League. The entire collective bargaining agreement must be formally written and ratified, but both Mr. Stern and Mr. Hunter expressed confidence that the deal would be approved.

The deal needs ratification by a simple majority of the 30 teams and a simple majority of the 430-plus players. Before that can happen, the parties must dispense with two pending lawsuits, and the players must reconstitute their union. It could be at least a week before the players are ready to vote.

It took negotiators 184 hours, across 25 bargaining sessions and 5 months, to end the second-longest labor crisis in league history. “We just thought that rather than try to pursue this in court, it was in both of our interests to try to reach a resolution,” Mr. Hunter said.

A version of this article appears in print on November 27, 2011, on page A1 of the New York edition with the headline: N.B.A. Reaches Tentative Deal To Save Season. Order Reprints|Today's Paper|Subscribe