LOS ANGELES — The bullpen gate swung open and out trotted … Max Scherzer? Yep, Washington’s ace surprised the Los Angeles Dodgers and even a few teammates in the eighth inning Friday night.

“All the chips are on the table right now,” Scherzer said.

“We weren’t expecting that,” Dodgers manager Dave Roberts said.

Stephen Strasburg turned in another dominant playoff outing, Scherzer struck out the side and Washington held off the Dodgers 4-2 Friday night to even their National League Division Series at a game apiece.

Even with Scherzer’s bullpen bombshell, Washington’s shaky relief corps still ran into trouble. Daniel Hudson labored through the ninth, loading the bases with two outs before striking out Corey Seager for the save. The tense final inning also included a twisting, falling grab by third baseman Anthony Rendon on Cody Bellinger’s pop fly in shallow left field, as well as a gutsy intentional walk by manager Dave Martinez that brought the winning run to bat.

Game 3 is back in Washington on Sunday night, where Scherzer was expected to face major league ERA leader Hyun-Jin Ryu.

“I’m going to see how he feels tomorrow,” said Martinez, adding Anibal Sanchez would start Sunday if Scherzer doesn’t.

“Honestly, it doesn’t matter,” Scherzer said. “You bring it when you’re told to bring it.”

Pitching on the shortest rest of his career, Strasburg took a perfect game into the fifth inning while outdueling Clayton Kershaw. Strasburg pitched one-run ball for six innings and struck out 10, lowering his career postseason ERA to 0.64 — the best in history for players with at least four starts. He edged out Dodgers great Sandy Koufax (0.95 ERA), who watched Game 2 from the front row.

“There’s obviously a lot of expectations, there’s a lot of excitement in games,” Strasburg said, “but I really tried over the years to train my mind into thinking that every single game is just as important and just sticking to my approach.”

Rookie Will Smith broke up Strasburg’s perfect bid with a two-out single. The three-time All-Star gave up his first earned run in 23 consecutive postseason innings dating to the 2014 NLDS against San Francisco and limited Los Angeles to three hits and no walks.

“Stras was on top of his game and really throwing the daylights out of the ball,” Scherzer said.

Scherzer came on for the eighth and struck out Gavin Lux, Chris Taylor and Joc Pederson on 14 pitches. The 35-year-old right-hander threw 77 pitches in the NL wild-card game Tuesday, yet he topped out at 99 mph in his fourth career playoff relief appearance.

“I felt I could really go one inning and recover from that,” Scherzer said. “I said whatever the situation is, I’m ready to pitch.”

Justin Turner led off the ninth with a ground-rule double off Hudson, spurring hope from a chanting, clapping sellout crowd of 53,086. A.J. Pollock struck out, and then Bellinger popped up to shallow left. Rendon misjudged the ball but recovered and made the catch while he tumbled over. The goateed All-Star smiled wide as he stood.

“The ball kept going and I kept thinking, ‘Where the hell is our left fielder at?'” Rendon said. “He didn’t call it so I knew I had to catch it.”

Martinez then intentionally walked Max Muncy, who had hit a solo shot off Sean Doolittle in the seventh, before Hudson walked Smith to load the bases. Seager fouled off four fastballs before Hudson got him to swing over a slider.

“It was a little more entertaining than I wanted it to be,” Hudson said. “I didn’t have the greatest command.”

The Dodgers struck out 17 times.

Strasburg was making the first start of his 10-year career on three days’ rest. The right-hander tossed three shutout innings with two hits Tuesday night in a dramatic wild-card victory over Milwaukee, the first relief appearance of his career.

“I’m very routine-oriented and I would say my younger self would be a little bit alarmed by it,” Strasburg said, “but now at this point in my career, it’s just another challenge.”

The Nationals took a 4-2 lead in the top of the eighth on Asdrubal Cabrera’s pinch-hit RBI single.

Los Angeles finally scored in the sixth on Turner’s sacrifice fly after Matt Beaty’s pinch-hit single and Pederson’s double. With the tying run at the plate, Pollock lined out to Strasburg to end the inning.

Until Smith broke through, the Dodgers’ closest attempt at a hit came in the third when Kershaw’s sinking line drive was grabbed by diving left fielder Juan Soto.

Kershaw ran into immediate trouble, with Trea Turner doubling on his first pitch of the game. After Adam Eaton popped out to third, Kershaw walked Rendon and hit Soto to load the bases. Howie Kendrick, who had two errors in a Game 1 defeat, followed with a run-scoring single.

The Nationals tacked on a pair of two-out runs in the second for a 3-0 lead. Kershaw hit Victor Robles leading off, and Robles moved to second on a sacrifice bunt by Strasburg. Eaton singled in Robles, and Rendon followed with a double off the wall in center.

“The second inning was not good. That was what decided the game really,” Kershaw said.

After the early damage, Kershaw settled down and gave up two hits over his final four innings.

The three-time NL Cy Young Award winner gave up three runs and six hits in six innings. He struck out four and walked one.