WASHINGTON — The Dodgers did Thursday night what they could not do against the Mets last season. They won Game 5 of the NLDS.

And they did it with Clayton Kershaw coming out of the bullpen two days after throwing 110 pitches. He got the final two outs — including superman Daniel Murphy — for the first save of his big-league career.

Los Angeles used a four-run seventh inning to beat the Nationals, 4-3, and advance to the NLCS against the Cubs beginning Saturday night at Wrigley Field.

After Joc Pederson tied the score with a home run, Carlos Ruiz drove in the go-ahead run with a pinch-hit single and Justin Turner added a two-out, two-run triple.

After the Nationals moved to within 4-3 in the bottom of the inning on a two-run homer by pinch hitter Chris Heisey, rookie Dodgers manager Dave Roberts brought in closer Kenley Jansen with a runner on first and none out. “That’s easy to do,” Nationals manager Dusty Baker said, “when you’ve got Kershaw behind him.”

A nine-out save? It could have been. But Roberts knew he had his ace in the hole, even though he had said before the game that he was “absolutely not” going to use him. “I came to him once Kenley went out there in the seventh,” Kershaw said. “I was just kind of doing the math. He told me to be ready for Murphy, and I felt fine, so it was good.”

advertisement | advertise on newsday

First Jansen had to get the game to the ninth. He allowed a one-out single by Bryce Harper to put runners on first and third but struck out Jayson Werth and — after issuing the second intentional walk of the night to Murphy — struck out Anthony Rendon to end the inning.

Kershaw, who started Tuesday’s Game 4, began warming in the bullpen as the Nationals hit in the bottom of the eighth. After a scoreless eighth, Jansen was at 37 pitches to start the ninth.

He struck out Trea Turner but walked Harper and Werth. Jansen threw 51 pitches in 2 1⁄3 innings — four fewer than Dodgers starter Rich Hill threw in 2 2⁄3 innings.

In came Kershaw to face Murphy, who Kershaw later called “probably the best hitter in the National League.”

Said Roberts: “I talked to the training staff and got the OK. I just felt that Kenley was going to go out there and give us everything he had, and for that Murphy at-bat, I wanted Clayton. So I felt good about it.”

Baseball videos

As the red-clad crowd chanted “MVP! MVP!” Kershaw got Murphy to pop to second for out No. 2. That left it to rookie pinch hitter Wilmer Difo, the only position player left on Baker’s bench.

Kershaw struck out Difo on a pitch in the dirt. The Dodgers were out of the dugout to celebrate even before Ruiz threw the ball to first to complete the out.

“The adrenaline rush was pretty good there,” Kershaw said. “It’s a different feeling to be out there for that last out. Gives me a lot of respect for closers.”

The Dodgers were trailing 1-0 against a brilliant Max Scherzer when Pederson led off the seventh with an opposite-field homer to left. Baker immediately removed Scherzer, his $210-million ace, who had thrown 99 pitches and didn’t allow a hit until the fifth.

That led to a parade of relievers and pinch hitters as the Dodgers took a 4-1 lead. The Nationals used six pitchers in the inning.

advertisement | advertise on newsday

Former Phillies catcher Ruiz, whom Los Angeles acquired on Aug. 25, gave the Dodgers a 2-1 lead with a single off the glove of diving third baseman Rendon. Ruiz had a pinch-hit, two-run homer in the Dodgers’ 8-3 win in Game 3.

One out later, Turner greeted former Yankee Shawn Kelley with a two-run triple off the centerfield wall.

The entire seventh inning took 1 hour, five minutes and 55 seconds, according to ESPN Stats & Info. The game took 4:32 and ended at 12:41 a.m. That was 62 minutes after the last D.C. Metro subway train left the ballpark station, leaving the disappointed crowd of 43,936 to fend for themselves to get home.

The Dodgers lost Game 5 to the Mets last season, 3-2, with Murphy hitting the go-ahead homer. Murphy hit .438 with six RBIs in this series, but couldn’t come through against Kershaw with the Nationals’ season on the line.

Kershaw did have a save in the minors, by the way. It came in 2006 in the Gulf Coast League.

advertisement | advertise on newsday

His catcher, according to MLB.com, was Kenley Jansen.