WASHINGTON (AP) -- Bryce Harper wasn't expecting a fastball with a full count from Joaquin Benoit.
Harper hit a two-run homer in the third inning and a game-ending, three-run drive with two outs in the ninth, leading the Washington Nationals over the Philadelphia Phillies 6-4 on Sunday.
"Benoit's tough with that devastating changeup he throws," Harper said. "I thought he was going to throw it there 3-2, but he left one up."
Harper had worked the count full against Benoit (0-1) before driving a 97 mph fastball to center for his fourth home run this season. It was Harper's fourth game-ending homer, his first since May 9, 2015, against Atlanta's Cody Martin. Harper has hit 18 of his 125 big league homers against the Phillies.
"I made a mistake and he made me pay," Benoit said. "No excuses."
Harper's first home run, a two-run shot off Jerad Eickhoff in the third inning, broke a 1-1 tie. The Nationals trailed 4-3 in the ninth when Benoit walked Chris Heisey with one out, and Adam Eaton singled before Anthony Rendon flied out.
"The thing that really got Harper up was the walk to Heisey," Phillies manager Pete Mackanin said. "Walks seem to score when we issue them."
Washington has won 15 of its last 19 games against Philadelphia. The Nationals won two of three during the weekend series.
Philadelphia took the lead in the ninth when Aaron Altherr doubled off Blake Treinen leading off and scored from third when, with the infield in, Freddy Galvis grounded to second baseman Daniel Murphy and catcher Matt Wieters dropped the throw on what was scored a fielder's choice.
Shawn Kelley (2-0) relieved with the bases loaded and got Maikel Franco to ground into a forceout.
"Kelley came in and got that big out," manager Dusty Baker said. "Blake was struggling. These guys have played us tough. It's come down to the last at-bat four of the six games we've played them."
Daniel Nava's RBI single in the eighth chased Nationals starter Gio Gonzalez, and Tommy Joseph tied the score with a two-out single off Koda Glover.
Gonzalez allowed three runs -- two earned -- five hits and three walks in 7 1/3 innings.
Eaton and Rendon hit consecutive doubles in the bottom half off Eickhoff, who allowed three runs and eight hits in six innings.
Washington has come from behind in six of its seven victories this season, including both of its victories over the Phillies in this series.
Phillies 2B Cesar Hernandez homered on the third pitch of the game, his second leadoff homer this season and the third of his big league career. Hernandez, who hit the go-ahead home run Saturday, has homered in consecutive games for the first time in his career.
Phillies: Herrera was out of the lineup for the first time in 12 games this season. Altherr got the start in center.
Nationals: SS Trea Turner (right hamstring strain) again participated in batting practice. He is eligible to return from the disabled list Wednesday.
Phillies: RHP Zach Eflin will start Tuesday's opener of a three-game series at the New York Mets, who swept three games from the Phillies on the road last week.
Nationals: Washington makes its first trip to SunTrust Park in Atlanta, with RHP Max Scherzer (1-1, 2.13) scheduled to start the opener of a three-game set Tuesday.
MORE NATIONALS: Rizzo still feels 'really good' about Nats bullpen