WASHINGTON — Pinch-runner Michael A. Taylor scored the go-ahead run on catcher Tyler Flowers’ throwing error as part of a three-run eighth inning and the Washington Nationals defeated the Atlanta Braves 9-7 on Tuesday night.

Taylor pinch-ran after Braves reliever Jose Ramirez (2-2) walked Ryan Zimmerman. Taylor stole second and, after Danny Espinosa’s walk, scored when an off-balance Flowers threw pinch-hitter Ben Revere’s bunt attempt well to the left of third baseman Adonis Garcia.

Trea Turner then hit a two-run single for Washington, which beat Atlanta for the 13th time in 15 meetings this season.

Koda Glover (2-0) retired the only two batters he faced to earn the victory, while Mark Melancon earned his 39th save in 42 opportunities.

Nationals right fielder Bryce Harper secured his first career 20 homer-20 steal season with a stolen base in the seventh.

Dansby Swanson, the 2015 overall No. 1 draft pick, hit an inside-the-park home run in the second inning. The shortstop lined a pitch from Gio Gonzalez over Turner and high off the fence in center field, 399 feet away. The ball caromed toward the infield, and Swanson slid home headfirst, easily beating the throw from Harper. It was his first career home run.

Swanson, who made his big league debut Aug. 17, entered the game hitting.236 with four RBIs in 55 at-bats. Atlanta’s previous inside-the-park home run was by Wes Helms on Oct. 7, 2001.

Swanson’s homer gave Atlanta a 3-1 lead, and the Braves added another run in the third on Freddie Freeman’s RBI single. But Washington blasted starter Williams Perez in the third inning, collecting three singles before Anthony Rendon launched an 0-2 pitch to left for his first career grand slam. Zimmerman chased Perez two batters later with a solo homer.

Perez allowed six runs in 2 1/3 innings. Gonzalez didn’t fare much better, allowing six runs in three innings.

TRAINER’S ROOM

Braves: RHP Matt Wisler (sore side) played catch a day after he missed his scheduled start. Interim manager Brian Snitker said Wisler would likely need a couple of side sessions before returning to the rotation.

Nationals: RHP Stephen Strasburg (right elbow soreness) threw a brief bullpen session but manager Dusty Baker would not say when Strasburg would return to the rotation. . Washington recalled INF Wilmer Difo and RHP Lucas Giolito from Triple-A Syracuse. Difo hit .257 with five RBIs in 35 at-bats in earlier stints with the Nationals, while Giolito is 0-1 with a 5.63 ERA in four starts in the majors.

UP NEXT

Braves: RHP Mike Foltynewicz (8-5, 4.31) starts the series finale for Atlanta. Foltynewicz earned a victory in his only previous start this year against Washington, allowing four runs in 5 2/3 innings on Aug. 12.

Nationals: Washington has not announced a starter for its final home game of the season against the Braves.