With the season on the line, the NHL and the players' association agreed on a tentative pact to end a 113-day lockout and save what was left of a fractured schedule.

Commissioner Gary Bettman and union executive director Donald Fehr ceased being adversaries and announced the deal while standing side by side near a wall toward the back of the negotiating room and showing a tinge of weariness.

"I want to thank Don Fehr," Bettman said. "We went through a tough period, but it's good to be at this point."

A marathon negotiating session that lasted more than 16 hours, stretching from Saturday afternoon until just before dawn Sunday, produced a 10-year deal.

"We've got to dot a lot of Is and cross a lot of Ts," Bettman said. "There's still a lot of work to be done, but the basic details of the agreement have been agreed upon."

Even players who turned into negotiators showed the strain of the long, difficult process.

"It was a battle," said Winnipeg Jets defenseman Ron Hainsey, a key member of the union's bargaining team. "Gary said a month ago it was a tough negotiation. That's what it was.

"Players obviously would rather not have been here, but our focus now is to give the fans whatever it is — 48 games, 50 games — the most exciting season we can. The mood has been nervous for a while. You want to be playing. You want to be done with this."

The collective bargaining agreement must be ratified by a majority of the league's 30 owners and the union's membership of approximately 740 players.

"Hopefully within a very few days the fans can get back to watching people who are skating, not the two of us," Fehr said.

All schedule issues, including the length of the season, still need to be worked out. The NHL has models for 50- and 48-game seasons.

The original estimate was regular-season games could begin about eight days after a deal was reached. It is believed that all games will be played within the two respective conferences, but that also hasn't been decided.

The players have been locked out since Sept. 16, the day after the previous agreement expired. That deal came after an extended lockout that wiped out the entire 2004-05 season.

"Any process like this is difficult. It can be long," Fehr said.

Time was clearly a factor, with the sides facing a deadline of Thursday or Friday to reach a deal that would allow for a 48-game season to start a week later. Bettman had said the league could not allow a season of fewer than 48 games per team.

All games through Jan. 14, along with the All-Star game and the New Year's Day Winter Classic had already been canceled, claiming more than 50 percent of the original schedule.

Without an agreement, the NHL faced the embarrassment of losing two seasons due to a labor dispute, something that has never happened in another North American sports league. The 2004-05 season was lost while the sides negotiated hockey's first salary cap.

Under the new CBA, free-agent contracts will have a maximum length of seven years, but clubs can go to eight years to re-sign their own players. Each side can opt out of the deal after eight years.

The pension plan was "the centerpiece of the deal for the players," Hainsey said.

The actual language of the pension plan still has to be written, but Hainsey added there is nothing substantial that needs to be fixed.

The players' share of hockey-related income, a total that reached a record $3.3 billion last season, will drop from 57 percent to a 50-50 split. The salary cap for the upcoming season will be $70.2 million and will then go down to $64.3 million in the 2013-14 season.

All clubs must have a minimum payroll of $44 million.

The league had wanted next season's cap to fall to $60 million, but agreed to an upper limit of $64.3 — the same amount as last season.

Inside individual player contracts, the salary can't vary more than 35 percent year to year, and the final year can't be more than 50 percent of the highest year.

A decision on whether NHL players will participate in the 2014 Olympics will be made apart from the CBA. While it is expected that players will take part, the IOC and the International Ice Hockey Federation will have discussions with the league and the union before the matter is settled.

After the sides stayed mostly apart for two days, following late-night talks that turned sour, federal mediator Scot Beckenbaugh worked virtually around the clock to get everyone back to the bargaining table.

This time it worked — early on the 113th day of the work stoppage.

George Cohen, the Federal Mediation and Conciliation Service director, called the deal "the successful culmination of a long and difficult road."

"Of course, the agreement will pave the way for the professional players to return to the ice and for the owners to resume their business operations," he said in a statement. "But the good news extends beyond the parties directly involved; fans throughout North America will have the opportunity to return to a favorite pastime and thousands of working men and women and small businesses will no longer be deprived of their livelihoods."

Before the sides ever came to an understanding regarding a 50-50 split of hockey-related revenues, the NHL first tried to cut the players' share from 57 percent to 46 percent.

A series of talks in the first couple of weeks of September don't bring the sides any closer, and the board of governors gave Bettman the authority to lock out the players at midnight on Sept. 15.

There was optimism about an end for the lockout when the sides held talks in New York on Dec. 5-6. The roller coaster took the participants and the fans on an up-and-down thrill ride that ended in major disappointment.

Fehr painted a picture that the sides were close to a deal, and Bettman chastised him for getting people's hopes up. Negotiations broke off, and the NHL announced it was pulling all offers off the table.

It wasn't until Beckenbaugh's determined effort in the final two days of the prolonged negotiations that the sides finally found common ground.

"We were making progress continually and to make a deal you have to continue to make progress until it's over," Hainsey said. "That finally happened today."

A billboard acknowledging the news with ‘Lockout Over, Let’s Go Bruins!’ was visible to motorists on Interstate 93 in Medford the first thing on Sunday morning.

"We are all very excited that the NHL and the NHLPA have reached a tentative agreement and we look forward to dropping the puck and playing Bruins Hockey in front of our fans at the TD Garden soon," a statement from Bruins President Cam Neely read.

But for some businesses near the Garden, there was still some frustration.

Jim Taggart, who manages the historic Fours on Canal Street said they've been taking a hit while the league and players union have tried to come to terms.

"Probably still a little not really understanding why it took so long. I think you and I could figure out how to split $3 billion a lot quicker than they did," Taggart said. "I would say that the Bruins is probably about a third of our business through the course of the year, so it's a lot of money."

Employees at The Harp said they’re usually at capacity for Bruins games but have been well below that since the lockout.

“It's damaging, especially for our servers and bartenders,” said Hannah Kempski. “It's a lot of their income."

A day after Trevor Noah was declared the new host of "The Daily Show," complete with the blessing of the exiting Jon Stewart, graphic tweets targeting women, Jews and victims of the Ebola virus are causing a social media backlash.