MINNEAPOLIS (AP) — The Minnesota Wild have agreed to terms with goalie Devan Dubnyk on a six-year contract.

The Wild announced the agreement on Saturday. Dubynk was acquired from Arizona in a trade in mid-January, and his arrival was the biggest reason for Minnesota's incredible turnaround.

The Wild were languishing at 18-19-5 before Dubnyk arrived. But he played in 39 of the final 40 games of the season, posted a 1.78 goals-against average and carried the Wild to the sixth seed in the Western Conference playoffs. They beat St. Louis in the opening round before getting swept by the Chicago Blackhawks in the semifinals.

Wild GM Chuck Fletcher says he believes the 29-year-old Dubnyk is entering his prime.

The Star Tribune of Minneapolis said the deal is worth $26 million.