Riley Sheahan scored with 3:44 remaining in the third period to give the Detroit Red Wings a 2-1 victory over the Anaheim Ducks on Sunday night for their fifth straight win.

Tomas Tatar also scored and Petr Mrazek made 30 saves to help Detroit end a four-game losing streak to Anaheim.

After Sheahan forced a turnover inside the Ducks' zone by tying up Ryan Getzlaf at the blue line, Dylan Larkin collected the loose puck and got it back to Sheahan. He unleashed a blistering wrist shot past John Gibson.

Corey Perry scored for the Ducks, and Gibson stopped 22 shots. Anaheim did not earn a point for only the second time in its last nine games.

The Ducks pulled Gibson for an extra attacker with 1:57 remaining. Shea Theodore had a good look on goal, but his shot sailed over Mrazek's right shoulder. After several Detroit clearances, Sami Vatanen couldn't get a final desperation shot off in time.

Detroit took the lead just 16 seconds in, with Tatar's pass redirecting in off Hampus Lindholm's stick at the top of the crease. It was the second own goal in a week for Anaheim, with the only goal allowed in a 4-1 win over Winnipeg last Sunday also inadvertently careening in off a Ducks' stick.

Anaheim seemed out of sorts after falling behind early, with Ryan Kesler and Vatanen taking unnecessary penalties. Nate Thompson had a short-handed breakaway on the second Red Wings' power play but sent his shot off the crossbar and out of play. The Ducks' first official shot on goal didn't come until exactly halfway through the period.

The second was much more effective. Perry took Getzlaf's pass and put a backhand in top shelf to tie the game. It was Perry's 16th goal of the season and third in the last four games.

Anaheim nearly took the lead seconds later on a 3-on-2 rush off the ensuing faceoff but Shawn Horcuff whiffed on the shot.

The Red Wings could have gone ahead 2-0 if not for a bizarre sequence on a shot by Sheahan. Television replays showed Sheahan's shot went in before hitting off the camera inside the goal and going through the top of the netting. However, the shot was not ruled a goal in real-time and a video review did not overrule the initial call.

Anaheim's best chance to take the lead in the second period came on a shot by Perry in the opening minutes that hit the inside of the post, while Gibson denied Gustav Nyquist in the closing 90 seconds.

With a noticeable and vocal contingent of Red Wings fans in attendance, the game took on an atmosphere recalling the fierce playoff battles between the two teams before Detroit joined the Eastern Conference in 2014.

NOTES: Detroit scratched C Joakim Andersson and D Jakub Kindl. Kindl, a first-round pick in 2005, cleared waivers Sunday. ... Anaheim scratched D Korbinian Holzer and F Patrick Maroon. ... Detroit continues its six-game trip Monday night at Los Angeles. ... Anaheim returns to action Wednesday night at home against Ottawa.