Updated

Detroit, MI (SportsNetwork.com) - Daniel Alfredsson scored the game-winning goal with just 0.4 seconds left in overtime as the Detroit Red Wings took a 5-4 victory over the Pittsburgh Penguins in a thriller from Joe Louis Arena.

Detroit had spent the final 3:46 of regulation and first 1:14 of overtime a man down after David Legwand was given a major and game misconduct for jamming Evgeni Malkin with the butt end of his stick in front of the net, but the team killed it off to keep the game going.

With time winding down, a turnover in the Detroit end saw the Red Wings go the other way on a 3-on-1. Skating down the right wing, Alfredsson let fly with a shot that Marc-Andre Fleury stopped, but the rebound came out front, went off Pittsburgh's Rob Scuderi and made it into the net just before the final buzzer.

"I didn't know there was only a few seconds left but I saw it go in before the horn went off so I thought it would be good," said Alfredsson. "Big break for us and we'll gladly take it today."

Alfredsson scored twice and added an assist, while Gustav Nyquist, Tomas Tatar and Todd Bertuzzi scored for the Red Wings, who have won three of their last four games. Jimmy Howard gave up four goals on 43 shots in the win.

Malkin scored twice with Lee Stempniak and Craig Adams also lighting the lamp for the Penguins, who have dropped three of their last four. Fleury stopped 25 shots in the loss.

"We got down again and answered with a big goal in the third," said Pittsburgh head coach Dan Bylsma. "We had that power play, the five-minute major from the butt end, and we should have been able to put it away but they killed it off."

Detroit got the only goal of the first period when Johan Franzen gained the zone down the middle and left a drop pass for Alfredsson, who cruised from the left wing to the slot and lifted a wrister past Fleury's glove at 7:21.

The Red Wings grabbed a 2-0 lead at 4:35 of the second on the power play when Nyquist threw the puck on net from the right side where it hit off the stick of Scuderi and slid into the net.

Pittsburgh, though, surged ahead with three goals over a 2:41 span with the first goal coming at 15:17 as Chris Kunitz threw the puck on net from the high slot and Stempniak re-directed it past Howard for his 10th of the year.

Just 25 seconds later, it was a tie game as the puck sat on the net at the left side and it popped into the air before hitting off Howard and going in, giving Malkin credit for his 20th goal of the season.

Skating on a power play, the Pens were then awarded a two-man advantage after Landon Ferraro threw the puck over the glass and was whistled for delay of game. Just 10 seconds later, Malkin blasted a shot on net from the high slot that beat a screened Howard for a 3-2 lead.

Detroit tied the game halfway through the third as two Pens collided in the neutral zone, allowing Detroit to go on a 2-on-1. Riley Sheahan sent the puck from the left wing to the low right side where Tatar shot it in for his 15th of the season.

Just over two minutes later, the Red Wings took a 4-3 lead as Bertuzzi threw the puck on net from the left boards and it went off of Pittsburgh's Olli Maatta and snuck in.

Pittsburgh, though, again tied the game as Brandon Sutter's little backhander from the right side to the front was one-timed in by Adams with 5:43 to play in regulation.

Game Notes

Pittsburgh hosts Tampa Bay on Saturday afternoon ... Detroit plays in Minnesota on Saturday afternoon ... The Penguins had taken a 4-1 win over the Red Wings in Detroit on Dec. 14. The two teams will meet one more time in the regular season, in Pittsburgh on April 9 ... Pittsburgh went 1-for=5 on the power play while Detroit finished the game 1-for-6.