LOS ANGELES -- Alec Martinez tipped in a rebound with 5:17 left in double overtime, lifting the Los Angeles Kings to their second Stanley Cup title in three years in a 3-2 victory over the New York Rangers before a sellout crowd of 18,713 at Staples Center on Friday night.

Kings goaltender Jonathan Quick stopped 28 shots, while Rangers netminder Henrik Lundqvist finished with 48 saves.

The Kings won their first Cup in 2012. They captured this one by winning three consecutive Game 7s on the road en route to the Western Conference title before dispatching the Rangers in five games.

Seventeen of the Kings on the current roster were members of the 2012 title team.

New York, like Los Angeles, had opportunities throughout the first overtime, including a breakaway by left winger Chris Kreider, whose shot sailed high, in the final seconds.

Defenseman Martinez's goal came when he pushed in the rebound of center Tyler Toffoli's shot from the left wing while winger Kyle Clifford was driving to the net.

Right winger Marian Gaborik delivered the game-tying goal and knotted the score at 2 in the third period, retrieving a blast by defenseman Drew Doughty and scoring on a wrist shot between the legs of Lundqvist on a power play at 7:56. For Gaborik, it was his 14th playoff goal, tops for the Kings.

That seemed to rejuvenate the Kings, who hadn't played with the same intensity of the Rangers up to that point. However, they couldn't close out the Rangers in regulation despite outshooting them 12-3 in the third period.

All three games at Staples finished in overtime.

Right winger Justin Williams gave Los Angeles an early advantage, knocking home a loose puck around the net for a 1-0 lead at 6:04 of the first period. It was Williams' ninth goal of the postseason.

After Kings left winger Dwight King was sent to the penalty box for high sticking, center Chris Kreider tied the score, fielding a pass from defenseman Ryan McDonagh and drilling it past Quick for a power-play goal with 4:23 remaining in the second period.

The Kings got careless late in the second period and the Rangers took advantage. Left winger Carl Hagelin corralled a miscue by Los Angeles near center ice and connected with center Brian Boyle, who slapped a shot from the left circle into the net for a short-handed goal and a 2-1 New York lead with 30 seconds left in the second.

NOTES: The Stanley Cup had been won on the road in five of the six previous years. The Kings were the only club to capture it at home, in 2012. ... Rangers G Henrik Lundqvist was 5-0 with a 1.00 goals-against average and .971 save percentage in elimination games entering Friday's contest. ... Los Angeles C Anze Kopitar was the team's points leader in the postseason with 26 entering Game 5, but hadn't scored a goal since the Western Conference semifinals against the Anaheim Ducks. ... Game 5 was the 26th game of the playoffs for the Kings, matching the mark set by the 1987 Philadelphia Flyers and the 2004 Calgary Flames, who both lost seven-game series.