DALLAS -- Antti Niemi made 31 saves, and the Dallas Stars scored three times in the second period to defeat the Detroit Red Wings 5-2 at American Airlines Center on Thursday.
Brett Ritchie, John Klingberg and Stephen Johns scored after Detroit took a 2-1 lead.
"I thought we skated really well," Ritchie said of the second period. "They are a pretty good skating team, but we were able to outskate them and get quite a few transition rushes. I thought we held onto pucks down low and I thought we just kept the pressure on them."
WATCH: All Red Wings vs. Stars highlights
Dallas tied the game 2-2 when Ritchie scored his ninth goal of the season on a deflection at 3:31. Radek Faksa took the shot after a turnover by Tomas Tatar behind the Red Wings net.
Klingberg gave Dallas a 3-2 lead at 15:53 when he finished off a rebound after Devin Shore drove hard to the net.
Video: DET@DAL: Niemi sprawls to deny Mantha with pad
Johns, making his return after sitting the past three games as a healthy scratch, gave Dallas a 4-2 lead at 16:42 when his shot deflected off Red Wings defenseman Jonathan Ericsson and past goalie Petr Mrazek.
"Yeah, I thought we got away from what was allowing us success in the first and what allowed us success in the third," Detroit coach Jeff Blashill said of the second period. "I thought it became too much of an up-and-down game at times, and then they ground us a little bit in our [defensive] zone."
Video: DET@DAL: Johns fires a shot that goes in off opponent
Niemi made 16 saves in the third period when Dallas was holding on to a two-goal lead.
"I had a hard time seeing in the first [period], but after that [the defense] did a good job," Niemi said. "It wasn't too tough to make the first save."
Patrick Eaves scored into an empty net with 1:06 remaining.
Lauri Korpikoski scored on the Stars' first shot of the game when he deflected Jordie Benn's point shot past Mrazek for his sixth goal of the season at 3:39 of the first period.
Video: DET@DAL: Korpikoski deflects shot into the twine
Detroit scored its third road power-play goal of the season, first since Oct. 19, to tie the game 1-1 at 14:09. With a 5-on-3 advantage, Gustav Nyquist scored his fifth goal of the season.
Henrik Zetterberg gave Detroit a 2-1 lead 93 seconds later after a turnover by Esa Lindell behind the Stars net. Anthony Mantha forced the mistake, and Nyquist made an easy pass to Zetterberg in the slot for his eighth goal of the season.
Mrazek made 16 saves.
Video: DET@DAL: Nyquist, Zetterberg combine for goal
Goal of the game
Klingberg got to a rebound in the second period after Mrazek made a difficult first save.
Video: DET@DAL: Klingberg slides puck past Mrazek in front
Save of the game
Niemi stopped Andreas Athanasiou with his left pad at 14:19 of the third period. After the save, Athanasiou slammed his stick against the boards.
"I was just trying to reach over and take anything away. I think I might have got it with a piece of the glove," Niemi said.
Video: DET@DAL: Niemi robs Athanasiou with his glove
Highlight of the game
Ritchie's game-tying goal came on a hard-working shift when he won possession behind the net before screening Mrazek.
"That was a pretty good long-grinding shift," Ritchie said. "I think that everybody was jumping to pucks. I was just trying to get to the front of the net. I knew [Faksa] was going to shoot it. It was sort of a quick reaction, sort of a lucky tip. It was good to get a stick on it."
Video: DET@DAL: Ritchie deflects slap shot into the net
Unsung performance of the game
After committing four minor penalties in the first period, the Stars committed one penalty the rest of the game and killed a Red Wings power play with 5:38 remaining.
They said it
"I thought, OK, there's more there. Obviously we know that, but I don't think he's 100 percent either. He might tell us he's close to 100, but I don't think he is." -- Stars coach Lindy Ruff on Jamie Benn's return from a foot injury
"It's a tough loss for us. We wanted to finish the road trip with two points. I think we started well. We had three or four power plays to score a goal. To be up 2-1 after the first, it was good for us, but some bad bounces in the second." -- Red Wings goalie Petr Mrazek
Need to know
The Stars put defenseman Jamie Oleksiak on injured reserve after he injured his hand against the Anaheim Ducks on Tuesday. Ruff said Oleksiak is out "at least a couple weeks."
Red Wings: Host the Pittsburgh Penguins on Saturday (7 p.m. ET; NHLN, FS-D, ROOT, NHL.TV)
Stars: Host the Minnesota Wild on Saturday (8 p.m. ET; FS-SW, FS-N, FS-WI, NHL.TV)
Video: Niemi shines in net as Stars defeat Red Wings, 5-2