LOS ANGELES (AP) -- Alec Martinez scored 14:43 into the second overtime, and the Los Angeles Kings won the Stanley Cup for the second time in three years with a 3-2 victory over the New York Rangers in Game 5 on Friday night.
Marian Gaborik scored a tying power-play goal with 12:04 left in regulation for the resilient Kings, who rallied from yet another deficit before finishing off the Rangers in the longest game in franchise history.
Jonathan Quick made 28 saves and Justin Williams scored an early goal as Los Angeles added a second title to its 2012 championship, the first in the franchise's 47-year history.
After innumerable late chances, Martinez popped home a rebound of Tyler Toffoli's shot. Martinez also scored the overtime winner to beat Chicago in the Western Conference finals.
Marian Gaborik scored the tying power-play goal with 12:04 left in regulation for the Kings, who were attempting to wrap up their second NHL title in three years on home ice.
Justin Williams scored an early goal and Jonathan Quick made 23 saves for Los Angeles, which won three of the series' first four games.
Chris Kreider scored a power-play goal and Brian Boyle added a short-handed score late in the second period for the Rangers, who were trying to avoid elimination again after winning Game 4 at Madison Square Garden.
Henrik Lundqvist stopped 40 shots in another standout performance, but Gaborik poked the tying goal between his legs on a rebound for his 14th goal in a spectacular postseason by the Kings' late-season acquisition.
The finalists headed to overtime for the third time in their three games at Staples Center, and they needed a second OT period for the second time.
Both teams had tantalizing scoring chances in the first overtime, but couldn't convert.
Ryan McDonagh hit Quick's post with a long shot during an early power play. Tyler Toffoli rang a shot off Lundqvist's post with 7:15 left, and the Kings trapped New York in its own end for an exhausting stretch late in the period.
Kreider got a breakaway in the final minute after Drew Doughty fell down, but he missed the net.
After falling behind early, New York outplayed the Kings and finally got the equalizer with 4:23 left in the second period while Dwight King was in the box for high-sticking. After several sharp passes in a prolonged possession, Ryan McDonagh found Kreider in front for New York's second power-play score of the series.
Boyle then got a stunner, capitalizing on the Kings' poor power-play work in the final minute of the period. He skated around Doughty and wired a shot into the far top corner behind Quick with 29 seconds left.
It was Boyle's third goal in 25 postseason games.
A stunned Staples Center crowd sat silent as the Kings left the ice for the second intermission. Until the late swerve, the Kings seemed to be on course for a celebration.
Los Angeles got another big-game goal from Williams, who put the Kings ahead just 6:04 into Game 5 after linemates Dwight King and Jarret Stoll applied pressure on Lundqvist, who made 40 saves in the Rangers' victory in Game 4.
Williams came up behind the scrum and slid the puck right underneath a sprawling Lundqvist for his ninth goal of an outstanding postseason.
The Kings had fallen behind 2-0 to begin three of the first four games in this series, so their fans vocally welcomed their first lead in three games at Staples Center, which was filled with raucous chants of "Go Kings Go!" while both teams were still in their dressing rooms.
But the Rangers kept pressure on the Kings during one of their best periods of the series, playing with no discernible worry about their perilous position. They kept it up in the second period, while the Kings struggled to match their pace and effort.