SAN FRANCISCO (CBS/AP) — The Washington Nationals turned the first triple play in their 12-season history, holding on in the eighth inning to help preserve a strong outing by Max Scherzer and beat the San Francisco Giants 4-1 on Friday night.

The Giants loaded the bases in the eighth with two walks sandwiched around a single. Brandon Crawford then lined an 0-1 pitch from Sammy Solis to first baseman Ryan Zimmerman, who had entered the game moments earlier as a defensive replacement.

READ MORE: VIDEO: Smash-And-Grab Robbery At Tanforan Mall Jewelry Store

Zimmerman quickly stepped on first base for the second out then threw to third baseman Anthony Rendon to catch Denard Span to complete the triple play.

The Nationals didn’t get to keep the ball from their milestone play, however. Rendon casually flipped it into the stands after the play.

San Francisco put two runners on base in the ninth but Shawn Kelly struck out new Giant Eduardo Nunez for his sixth save.

Nationals v Giants

Gregor Blanco watches the ball bounce off the right centerfield wall for an RBI triple off the bat of the Nationals’ Daniel Murphy in the top of the fifth inning July 29, 2016. (Thearon W. Henderson/Getty Images)

Jayson Werth had two hits for the Nationals to extend his on-base streak to 32 games, tied with Boston’s Dustin Pedroia for the longest active streak in the majors, and Ben Revere hit a tiebreaking single in the fifth.

Daniel Murphy added an RBI triple while Wilson Ramos doubled and scored to help the Nationals win their second straight in this four-game series between division leaders.

Scherzer (11-6) had lost four of his five career starts against the Giants and a no-decision in Game 4 of the 2012 World Series before holding San Francisco to one run over seven innings.

The four-time All-Star retired 14 of the final 16 batters he faced and finished with six strikeouts and two walks.

Over his last six starts Scherzer has allowed just five earned runs in 41 1-3 innings.

Four relievers combined to retire eight batters.

READ MORE: CA Drought: Big Sur 'Colorado' Fire Could Be Start Of Year-Round Wildfire Season

Four players had two hits apiece for the Giants. San Francisco fell to 2-11 since the All-Star break.

All of Washington’s runs came off Giants starter Jeff Samardzija (9-7).

FAN CHARGES FIELD

The game was interrupted in the top of the seventh inning when a fan ran onto the field. The man avoided security guards for a few moments then dropped to one knee near Giants SS Crawford before being tackled and escorted away.

TRAINER’ S ROOM

Nationals: Backup catcher Jose Lobaton was placed on the 15-day disabled list with left elbow tendinitis. The move is retroactive to July 20. … Pedro Severino was called up from Triple-A Syracuse.

Giants: Nunez, obtained a day earlier in a trade from Minnesota, was added to the 25-man roster and was in uniform. To make room, outfielder Jarrett Parker was optioned down to Triple-A Sacramento. … 3B Matt Duffy (left Achilles strain) took infield and ran the bases before the game in anticipation of beginning a rehab assignment.

UP NEXT

Nationals: RHP Reynaldo Lopez (0-1) will be called up from Syracuse to face San Francisco on Saturday. Lopez lost in his major league debut against the Dodgers on July 19.

Giants: RHP Jake Peavy (5-9) will make his 14th career start against the Nationals franchise. Peavy’s first came during his rookie season of 2002 against the then-Montreal Expos.

MORE NEWS: Xfinity Comcast Outage In San Francisco - Bay Area

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed