It took the entire offseason, but Ivan Provorov and the Flyers finally reached a deal in the evening hours on the night before training camp opens. Hey, deadlines spur action.

The deal -- a six-year, $40.5 million deal with an average annual value of $6.75 million -- is more than just the completion of a deal in time for Provorov to report for training camp on Friday morning. It is a win for both sides -- for Chuck Fletcher and the Flyers and for Provorov as well.

From the beginning, Provorov wanted to be in Philadelphia. There was never any thought to playing anywhere else. He was going to remain a Flyer no matter what. But the process had to play out.

There were two other counterparts in the restricted free agent pool also waiting. Their waits lasted the entire offseason as well. Zach Werenski finally broke the ice when he signed a three-year, $15 million deal with Columbus on Monday. Charlie McAvoy should follow with the Bruins soon enough now that both Werenski and Provorov are locked up.

Werenski’s deal put a new option on the table. From the beginning, it seemed like Provorov and the Flyers were destined for a long-term pact. A three-year deal suddenly became an option, and with time running out to complete a deal before camp, it was certainly a possibility. Even just hours before details of Provorov’s new deal were revealed, a three-year offer was still on the table.

At times during this offseason, it seemed like Provorov and the Flyers weren’t even close to a new deal. There was a report that surfaced that Provorov and his agent were seeking a $10 million AAV. That was never true, but the thought that he could be looking for $8 million or more was very much possible.

Throughout the process, it did seem that term was equally as important in the deal. A long-term commitment always seemed likely. A seven-year deal sounded like a logical goal. In the end, Provorov got six years and $6.5 million per year, a pretty balanced total.

From Fletcher’s side, it seemed like everything about this deal was a win. Yes, it took a long time to complete. Yes, there were times where it seemed like Provorov was going to cost a lot more than expected. Fletcher just waited it out, just like all of the RFAs still needing contracts.

It’s no secret the role Provorov plays for the Flyers. He averages over 25 minutes a night. He plays a lot of shorthanded time. He fills the top-pairing role. And that means he was going to get paid like it.

Provorov’s $6.5 million AAV makes him the highest paid defenseman on the roster, and given his role, it’s understandable.

But there is something about that number that really just feels good for the Flyers. Sure, the $6.5 million AAV may be a little high for a fourth-year defenseman coming off a down year, the worst of his career so far. But if Provorov turns it around -- and there’s no reason to believe he won’t -- imagine what that contract will look like in three years. Imagine if Provorov starts producing and has all of the defensive ability that Erik Karlsson does or John Carlson does. Erik Karlsson signed an eight-year deal with an $11.5 million cap hit this offseason. John Carlson signed an eight-year deal with an $8 million cap hit last season. And Provorov will be making nearly $5 million less than Karlsson and $1.5 million less than Carlson.

By that logic, it becomes a steal for the Flyers. It does rest in Provorov’s hands whether he proves to be worth the contract, but if he gives you anything close to his sophomore season, he will be worth more than his contract.

The Flyers work is not done for the offseason -- even if the offseason is officially over with the start of camp. Travis Konecny will not be there for Day 1, still waiting for a contract of his own. Weeks ago, it seemed impossible that Provorov would have a deal before Konecny.

But he does. And it’s a good one for both sides. Just in time for the start of training camp.

Kevin Durso is Flyers insider for 97.3 ESPN and Flyers editor for SportsTalkPhilly.com. Follow him on Twitter @Kevin_Durso.