WASHINGTON — Marian Gaborik stood outside the Rangers’ dressing room, exhausted but happy and, most of all, redeemed.

“It was about will,” he said. “We wanted to win this game.”

Gaborik’s goal at 14 minutes 41 seconds of the third overtime period ended an epic battle of wills between the Rangers and the Washington Capitals that began Wednesday night and hurtled on into Thursday morning, and finally finished at 12:14 a.m. with the Rangers on top, 2-1. It felt like two full games, and in total time played it very nearly was. In the end, it gave the Rangers a 2-1 lead in this Eastern Conference semifinal.

It was the Rangers’ first playoff victory in overtime after seven straight overtime playoff losses, one short of the N.H.L. record.

At 114:41, it was the longest Rangers game in 73 years, and the fifth longest in club history — the four longer ones all took place in the 1930s. It was also the longest game in the N.H.L. since 2008.