The Calgary Flames have signed Jaromir Jagr to a one-year, $1 million contract, reports Sportsnet’s Elliotte Friedman. The deal confirms the future Hall of Famer will be back in the NHL for a 24th season.

Jagr will also have the option to attain $1 million in bonuses by the end of the season.

The news comes just days before the start of the 2017-18 season and after an offseason of rumors that Jagr would be heading to the Czech Republic should an NHL deal fall through.

Jagr managed to be one of the better performers to hit unrestricted free agency this year despite his age. The 45-year-old is coming off another solid performance in which he recorded 46 points in 82 games. That’s down from 66 points in 79 games the year before, but his shooting percentage dropping from 18.9 percent to 8.8 percent is a big reason for the decline.

The turmoil around the status of Jagr reached a fever-pitch this offseason, as it seemed the closer we got to the season the less likely it seemed he would sign in the NHL. The Florida Panthers elected not to bring back Jagr early in the offseason, but rumors around the star were few and far between.

The Flames were previously linked to Jagr in August when Friedman said they “looked at” adding him to the team. Also in the running were the St. Louis Blues, who have been decimated by injury this offseason and talked internally about picking up Jagr on free agency.

Jagr had planned to announce his team of choice on Oct. 5 and was previously playing with the Czech team he owns, Kladno, in the meantime.

Calgary will get an immediate bump in its lineup from the addition of Jagr. While the Flames currently have Micheal Ferland as their top line left winger, putting Jagr on a line with Johnny Gaudreau and Sean Monahan is an incredibly enticing prospect.

The Flames now have $2.6 million left in cap space with all 23 roster spots accounted for.