With an arbitration hearing scheduled for 9 a.m. Wednesday in Toronto, the Washington Capitals and forward Marcus Johansson settled with three minutes to spare, agreeing to a three-year, $13.75 million deal with an average annual value of $4.58 million. Johansson will make $4.25 million next season and $4.75 million in the last two years of his contract, in which Johansson also will have a five-team no-trade clause, according to a source.

That leaves the Capitals with about $3.45 million in salary cap space for next season, according to generalfanager.com, and restricted free agent defenseman Dmitry Orlov has yet to re-sign.

Johansson was in Toronto for the hearing Wednesday morning. His agent, J.P. Barry of CAA Sports, said the two sides started negotiating last night and reached an agreement at 8:57 a.m. Had Johansson gone to arbitration, he would have been the first player since 2006 (as far back as generalfanager.com’s arbitration tracker goes) to have two arbitration hearings in his career, as few players get to that point.

“I don’t think anyone wants to go to arbitration; that’s kind of a last resort,” Johansson said on a teleconference. “I love it in Washington, and my whole family does. We’re really happy to stay there. I don’t have any complaints about being in Washington. I love the guys and the fans and the whole organization. I’m really happy that we could work something out to be able to stay for three more years.”

Entering arbitration, Johansson had submitted an initial request for a $5.25 million-per-year contract, while the Capitals countered with an offer of $3.85 million, and Johansson’s new salary falls roughly in the middle. Had both sides required an arbitration ruling, the result would have been a one-year deal that made Johansson an unrestricted free agent at the end of the season.

“We have a good team, and I think they want to keep much of the team together,” Johansson said. “It’s hard. It’s the business part of it. It takes some time sometimes to come to an agreement and then to make sure both parts are happy.”

Johansson’s previous one-year, $3.75 million deal came out of an arbitration hearing last summer after a strong 2014-15 season. The fact that he maintained a high level of production last season resulted in this summer’s raise. In the 25-year-old’s first season under Capitals Coach Barry Trotz, Johansson finished with 20 goals and 27 assists while playing in every game. Last year, he scored 17 goals and added 29 assists in 74 games, raising his points per game while also showing versatility in playing both wing and center. In the postseason, he had two goals and five assists.

After the Capitals traded for center Lars Eller during the NHL draft, Johansson is expected to play wing in the middle-six of Washington’s forward corps, an important cog to the Capitals’ getting offensive contributions throughout the lineup. The speedy Swede also plays on the top power-play unit, an option on the breakout and often serving as the net-front presence for Washington.

“To be able to keep the team [together], it’s hard,” Johansson said. “I mean, it’s hard for everyone. I’m just happy that we could figure it out in the end. To be able to be part of this team for three more years, that’s important to me. I think both parts are happy with it. There’s obviously the cap in the NHL and you have to find a way to stay under it, and we finally came to an agreement that made both parts happy.”