It wasn’t easy – and it certainly wasn’t pretty – but the Penguins have tied the longest home-ice winning streak in franchise history.

They defeated Winnipeg, 6-5, this afternoon for their 12th consecutive victory at Consol Energy Center.

The Penguins (31-12-1) have not lost here since a 2-1 defeat by Philadelphia Nov. 13.

Defenseman Kris Letang, who had missed the previous 10 games because of an elbow problem, and center Evgeni Malkin, out the previous nine with an apparent leg injury, rejoined the Penguins’ lineup.

Malkin, in particular, had a profound impact on how the game played out.

Penguins goalie Marc-Andre Fleury denied Evander Kane of the Jets on a breakaway 33 seconds into the game but couldn’t stop defenseman Jacob Trouba from flipping in a shot from near the front of the net at 1:47.

Trouba’s goal ended the Penguins’ run of 438 minutes, 19 seconds of not trailing at home.

Penguins center Sidney Crosby was awarded a penalty shot when Winnipeg defenseman Mark Stuart hooked him during a breakaway at 16:52, but he couldn’t beat Jets goalie Al Montoya.

Jets center Mark Scheifele capped a forgettable period for the Penguins by beating Fleury with a changeup from the right hash just 3.9 seconds before intermission.

The Penguins seemed to regain at least some of their focus between periods, however, because they had a 3-2 lead before the second was five minutes old.

For a little while, anyway.

Malkin, who missed the previous nine games with an apparent leg injury, beat Montoya from above the right circle 66 seconds after play resumed. The goal, Malkin’s 15th, earned an assist for Jussi Jokinen.

James Neal pulled the Penguins even with a power-play goal at 4:25, as he took a feed from Letang and threw a shot by Montoya from the left dot for his 15th.

He rang up No. 16 just 34 seconds later, when his harmless-looking shot from along the left-wing boards eluded Montoya.

After Blake Wheeler tied the game at 6:02, Jokinen put the Penguins back in front at 11:38, scoring his 12th from the right side of the slot.

But the course of the game changed abruptly again at 17:31, when Penguins defenseman Brooks Orpik lost his balance – and the puck – while turning at the left point in the Winnipeg end. Kane grabbed, broke in alone on Fleury and beat him to make it 4-4.

And with 17.8 seconds to go, Kane flipped another shot past Fleury from the right side of the crease to put Winnipeg back on top.

Malkin wasn’t finished, however, and at 8:29 of the third, he swiped in a loose puck that was lying in the crease to tie the game yet again.