Detroit Red Wings right wing Gustav Nyquist (14) celebrates his goal against the San Jose Sharks in the first period of an NHL hockey game Sunday, Feb. 24, 2019, in Detroit. Credit: Paul Sancya | AP

SAN JOSE, Calif. — The San Jose Sharks acquired forward Gustav Nyquist, a former University of Maine star, from the Detroit Red Wings on Sunday night for two draft picks in a deal they hope adds scoring depth for a Stanley Cup push.

Nyquist scored a goal earlier in the day for Detroit in a 5-3 loss to San Jose. The teams then finalized the deal hours later after Nyquist waived his no-trade clause, with the Sharks sending a 2019 second-round pick and conditional 2020 third-rounder to the Red Wings.

“Gustav is a talented, versatile forward who plays with speed and a strong hockey sense,” general manager Doug Wilson said. “His track record of strong play and character speak for themselves and we’re very excited to add him to our dressing room.”

The Sharks wanted to add more forward depth as they try to make a run for a title this season. They are third in the NHL with 82 points and are just three points behind first-place Calgary in a tight Pacific Division race.

San Jose is third in the league in scoring at 3.62 goals per game and has five players with at least 20 goals this season. Nyquist will likely fit in on either the second or third line with San Jose.

The 29-year-old Nyquist has 16 goals and 33 assists in 62 games this season in the final year of a $19 million, four-year deal. The Red Wings will reportedly retain 30 percent of Nyquist’s salary to help make the deal work with the salary cap.

In 481 career games with Detroit, Nyquist has 125 goals and 170 assists.

Nyquist was a two-time Hobey Baker Award finalist at UMaine where he played for three seasons before leaving in 2011 for a pro hockey career.

A native of Malmo, Sweden, he led the nation in scoring as a sophomore with 19 goals and 42 assists for 61 points in 39 games.

He finished with 144 points (50 & 94) in 113 games at UMaine.

The pick in the 2020 draft will become a second-rounder if the Sharks make the Stanley Cup Final this season or if Nyquist re-signs with San Jose as a free agent this summer. The Sharks have Florida’s second-round pick this year, as well as their own, and will send the lower selection to Detroit.

The Red Wings are in rebuilding mode with the third-fewest points in the league this season with 55. Detroit previously traded defenseman Nick Jensen to Washington on Friday for prospect Madison Bowey and a 2020 second-round pick.