The NHL and Players' Association reached a tentative agreement early Sunday morning to end the 113-day lockout just under the wire.
But it took a marathon 16-hour negotiating session with a federal mediator to get to the agreement.
NHL commissioner Gary Bettman says the details still need to be worked out, but the basic framework is there.
The next step is ratification by the league's 30 owners and around 740 players.
Executive Director of the NHL Players' Association Donald Fehr says ``hopefully within a very few days the fans can get back to watching people who are skating, not the two of us.''
Both sides are staying mum on the details of the deal, but there are reports it includes a 10-year agreement with an opt-out option after eight years.
The deal also includes a $64.3 million salary cap for ths next two years.
Both sides had until Friday to reach a deal before the whole season would have been scrubbed.
(with files from The Canadian Press)