The National Basketball Association moved closer to avoiding the ignominy of becoming the second North American sports league to cancel an entire season because of a labor dispute early Saturday morning, as owners and players reached a handshake deal on the framework of a new collective bargaining agreement that would allow teams to begin playing on Christmas.

Under immense pressure to quickly settle their differences in time to have a 66-game season starting on Dec. 25, representatives for the league and players met for an exhausting, 15-hour negotiating session and held a joint news conference around 3:30 a.m. to announce that the owner-imposed lockout of the players was almost over after 149 days.

“The reason for the settlement was we’ve got fans, we’ve got players who would like to play and we’ve got others who are dependent on us,” NBA Commissioner David Stern said. “And it’s always been our goal to reach a deal that was fair to both sides and get us playing as soon as possible, but that took a little time.”

The NBA played just 50 games during a lockout-shortened campaign in 1998-99, but Stern had no interest in repeating the mistakes of the past or in following the lead of the National Hockey League, which canceled the 2004-05 season when its owners and players failed to come to terms on a deal. The NBA will now have a schedule with 16 fewer games than a normal 82-game regular season.

“We thought it was in both of our interests to try to reach a resolution and save the game,” said Billy Hunter, executive director of the National Basketball Players Association.

After nearly five months of often-contentious negotiations that eventually prompted the players to disband their union and file an antitrust lawsuit against the NBA, the two sides finally agreed to a deal that would allow players to receive a 49 to 51 percent “band” of basketball-related income, which would be linked to league profitability. The players received 57 percent last year, a concession that will give back nearly $3 billion to the owners over the length of the deal. Owners received a harsher salary cap system that punishes high-spending teams.

Smaller details within the tentative agreement still need to be hashed out, and both sides are prohibited from publicly disclosing them given the sensitive nature of the on-going litigation. The deal would then need to be approved by 15 of the 29 owners (the NBA owns the New Orleans Hornets). The players also would have to dismiss their antitrust lawsuit in Minnesota, reconstruct the union and pass the deal by a majority vote of its 430-plus members.

Stern said he doesn’t expect unanimous support but anticipates that both sides will endorse the deal. Players and owners both have the right to opt out of the 10-year agreement in six years.

“The best deals are the ones that no one is 100 percent happy with,” one high-ranking NBA executive said, on condition of anonymity because he was not allowed to comment publicly on the agreement.

The NBA was in serious of jeopardy of losing the season on Nov. 14, when the players union rejected a take-it-or-leave-it offer from the league, filed a disclaimer of interest to take the league to court and Stern declared that the NBA was headed for a “nuclear winter.” The legal maneuver would either create leverage in an out-of-court settlement or place the league in danger of paying out triple damages for a lost season — almost $6 billion, based on $2 billion in salaries.

Stern played down the threat of litigation, and Gary Roberts, a sports law expert at the Indiana University School of Law in Indianapolis, also felt that it had a minimal influence on the outcome.

“My guess is that it certainly was a factor hanging over the conversations, but I doubt that it was decisive,” Roberts said in a telephone interview. “I don’t think the owners were terribly afraid of the lawsuit. It’s hard to make any kind of conclusions, but I think what drove the sides much more than the lawsuits was impending loss of the entire season. The lawsuit was going to take a long time to play out and I don’t think either side wanted that.”

The calendar was perhaps a greater motivator, with Stern estimating that it would take 30 days for the league to ratify a deal, sign free agents and hold training camps. Stern said training camps and the free agent signing period would both begin on Dec. 9 — just 16 days before the season kicks off with three games: Boston at New York, Miami at Dallas — a matchup featuring last year’s NBA finalists — and Chicago at the Los Angeles Lakers.

The deal didn’t arrive without both sides sacrificing hundreds of millions of dollars. Some team and league employees lost their jobs during the work stoppage. Businesses near the arenas and the game-day workers also felt the financial ramifications.

“For myself it is great to be a part of this particular moment in terms of giving our fans what it is that so badly they have wanted to see,” said union President Derek Fisher of the Lakers. “The most important key thing here is that our fans and the support from the people and the patience through a large part of this process, that is who a lot of this credit goes to. The efforts that have been made have been largely with them in mind.”

Lawsuit settlement talks had begun earlier this week and intensified to the point that Hunter called Fisher and union Vice President Maurice Evans of the Washington Wizards to come to New York to close the deal. The players were assisted by attorney Ron Klempner and economist Kevin Murphy and sat across from Stern, Deputy Commissioner Adam Silver, San Antonio Spurs owner and labor relations committee chairman Peter Holt, and attorneys Rick Buchanan and Dan Rube.

“We resolved, despite some even bumps this evening, that the greater good required us to knock ourselves out and come to this tentative understanding,” Stern said.

Owners locked out the players July 1, claiming that they had lost hundreds of millions of dollars since the collective bargaining agreement was ratified in 2005 and needed a system that allowed all 30 teams to be competitive and profitable. Players agreed to reduce their share of the revenues, coming down from 57 percent of revenues in the previous deal.

Silver mentioned that all of the owners’ goals were not met but said enough had been put in place to satiate them. “This was not an easy agreement for anyone. Owners came in having suffered substantial losses and feeling the system wasn’t working fairly across all teams,” Silver said. “I certainly know the players had strong views about expectations in terms of what they should be getting from the system. It required a lot of compromise from both parties’ part, and I think that’s what we saw.”

“We want to play basketball,” Stern said.

“Let’s go play basketball,” Holt said.