Asdrubal Cabrera watches his two-run home run sail into the emptied out Nationals’ bullpen in the 14th inning to give Washington a three-run cushion. (Jayne Kamin-Oncea/Usa Today Sports)

Adam LaRoche was so certain he would not play Wednesday afternoon he left his bats in the clubhouse. He had spent Tuesday’s game in the trainer’s room trying to dull back stiffness, his workday a cocktail of muscle relaxers, heating pads and cold tubs. During part of Wednesday’s game, LaRoche slept.

In the ninth inning, before a lazy contest turned into a loopy classic, the Washington Nationals needed LaRoche. They trailed by two runs, a runner on first base, the Los Angeles Dodgers’ closer on the mound. LaRoche walked down to the tunnel and picked one of Jayson Werth’s bats out of the rack.

The Nationals had been on the road for 10 days. What was another five innings? Why not another couple hours of baseball that turns your knees into goo and trains your heart for October? LaRoche blasted a game-tying home run, which only began the madness in the Nationals’ trip-ending, brain-melting, 14-inning, 8-5 victory over the Los Angeles Dodgers.

“I don’t know,” Manager Matt Williams said, when asked how he would describe the afternoon. “I don’t know.”

The Nationals took the lead with three runs in the ninth inning, only for Werth to drop a flyball with two outs in the bottom of the ninth and allow the game-tying run to score. The Nationals survived two bases-loaded, extra-inning jams and scored two runs in the top of the 12th inning, only for Carl Crawford to hit a two-out, two-run homer off Tyler Clippard in the bottom half.

The Post Sports Live crew debates where Matt Williams should play Ryan Zimmerman when he returns from the DL to a likely first-place team in the middle of a pennant chase. (Post Sports Live/The Washington Post)

Even though LaRoche entered in the ninth, he played five innings through back and other assorted maladies and drove in five runs, including the go-ahead run with a grounder that forced him to beat out a double play, balky back and all. Asdrubal Cabrera provided welcome breathing room with a two-run homer off Kevin Correia.

When starting pitcher Doug Fister pinch hit to lead off the 13th inning, he became the 25th player Williams used. Blake Treinen pushed the team record to 26 when he entered in the 13th. Two innings later, when Treinen got Crawford to groundout to Desmond, the game ended 5 hours 34 minutes after it began — the longest game in Nationals history.

It would have been so much easier if Werth had just caught that ball. It would not have been nearly as much watch-through-your-fingers fun.

“We’ve been doing this all year, making it exciting,” said starter Jordan Zimmermann, who allowed two runs in 61 / 3 innings. “It’s not over until you get that last out. After the ninth inning, it was kind of a roller coaster.”

For three days at Dodger Stadium, and especially Wednesday afternoon, the Nationals and Dodgers played a brand of baseball that kindled hopes for an October rematch. The Nationals won their season series with the Dodgers, 4-2, and they left Los Angeles with a two-game lead over them in the race for best record in the National League.

The Nationals’ victory held their lead in the National League East at seven games and dropped their magic number, with 24 games remaining in the regular season, to 17. They completed their road trip 4-5, redeeming a sweep in Philadelphia with series victories in Seattle and Los Angeles, the final victory coming in stunning fashion.

“It’s not fun,” Williams said. “We could have folded there, but they didn’t. They didn’t fold.”

When the ninth inning began, Jansen had never allowed the Nationals a run and had yielded only three hits in 142 / 3 innings, including the one out he recorded in the eighth inning. Bryce Harper pierced him with a laser of a single into left field, one his three hits. Williams called back Tyler Moore and sent in LaRoche.

LaRoche first felt back stiffness on the bus ride to Philadelphia, and as he played through it he went 1 for 23 with six strikeouts. Against Jansen, LaRoche fouled off one pitch, breaking his bat and forcing to borrow another of Werth’s bats. Jansen threw him a cutter over the outside that did not cut. LaRoche crushed it to left field, and the ball hopped over the fence.

Catcher Jose Lobaton continued the rally with a single, and pinch runner Danny Espinosa stole second. With two outs, Denard Span ripped a single to right, scoring Espinosa with the go-ahead run.

Closer Rafael Soriano walked to the mound looking for his 32nd save of the season, even with a 6.11 ERA since the all-star break. Justin Turner walked to the plate with two outs and Andre Ethier on first after a walk.

Werth had noticed the sun start to beat down from over the stadium. He knew if Turner hit a ball to his left, it might be trouble. Turner lofted a fly to the right field corner. Werth chased it down, squinting through sunglasses into the sun.

As he reached the ball, Werth knelt to catch it. The ball deflected off his mitt. The crowd hollered as it trickled to the wall and Ethier raced around the bases. Soriano escaped further damage. Werth surely wished he could have dug a hole in right field and crawled into it.

“It’s just like [the] worst feeling in the world,” Werth said. “It’s a helpless feeling. There’s nothing you can do. You play this game long enough, it will happen to you. Unfortunately, it happened to me in the ninth inning with two outs in a pretty meaningful game. It totally erased what Adam did.”

But LaRoche would have another chance. The Dodgers loaded the bases with one out in the 10th against Craig Stammen. Williams used September call-ups Xavier Cedeno and Aaron Barrett as a lethal tandem. Cedeno stuck out Adrian Gonzalez, and Barrett’s slider turned Juan Uribe into a mound of dust. In the 11th, Jerry Blevins escaped his own bases-loaded mess, somehow striking out Dee Gordon after Gordon swung at a pitch that hit him.

In the 12th, the Nationals loaded with one out, after Rendon walked, Werth singled and Harper singled off Brandon League. LaRoche came to bat again. In the 10th inning, LaRoche had been hit with a pitch in the left elbow. “Usually when a guy gets hit there, he comes out of the game,” Werth said. “He had to stay in there.”

LaRoche did not know if he could even swing. “He was thinking about laying down a bunt,” Williams said.

Instead, LaRoche stroked an opposite-field single. Two runs scored, and inside the Nationals’ dugout, LaRoche’s legend grew.

“He probably needed another day off,” Clippard said. “We couldn’t give it to him, but he came through in a big way.”