WASHINGTON -- Pete Mackanin laughed just a little bit when asked about the possibility of pitching around Bryce Harper with a runner on first and two outs in the bottom of the ninth inning and the score tied.
"I didn't even think of it," said Mackanin, the Philadelphia manager. "I'm not putting the winning run on second base for (Ryan) Zimmerman."
Losing in walk-off fashion isn't funny for the Phillies, who fell 6-4 as Harper hit a two-run homer with two outs in the last of the ninth off Edubray Ramos as the first-place Washington Nationals stormed back to beat the Philadelphia Phillies on Saturday night.
"Just locking in. It is a lot of fun," Harper said of the dramatic moments. "Being able to go out there and compete, and do the things you can to help your team win. Big moments, big spots, big situations, you always want to do that and live for that, and it was a lot of trying to do that tonight."
It was the fifth career walk-off homer for Harper, who earlier in the day signed a contract for the 2018 season. Adam Lind began the bottom of the ninth with a pinch-hit single to right.
"Signed a big contract today, took advantage of it," Mackanin said. "Those kind of hitters don't miss fastballs. That was what he was looking for and he got it."
Harper also hit a walk-off homer against the Phillies on April 16. He noted the Nationals play two games Sunday and he didn't want to go extra innings.
"I just try to go up there and not really think about it," Harper said. "Just try have a good at-bat and get us off the field."
The winning pitcher was Shawn Kelley (3-0), who pitched a scoreless ninth. Ramos (0-3) was tagged with the loss.
Washington's Ryan Zimmerman had two hits and drove in two runs.
Michael A. Taylor was 2-for-4 for the Nationals, who had been rained out the previous two days and had not played since a walk-off win Wednesday over the Baltimore Orioles.
Tommy Joseph was 2-for-3 for the Phillies, who have lost three in a row.
The Washington bullpen, which began the day with the highest ERA in the league, did not allow a run in 4 1/3 innings.
Philadelphia rookie Nick Pivetta, drafted by the Nationals in the fourth round in 2013, outpitched veteran Tanner Roark early before Washington came alive.
Pivetta, traded to Philadelphia for Jonathan Papelbon in 2015, also had his first major league hit with a single in the fifth.
The Phillies scored three runs in the fourth to take a 3-0 lead against Roark.
Michael Saunders had a run-scoring single and Cameron Rupp followed with a two-run single with the bases loaded two batters later to make it 3-0.
Joseph had an RBI double off reliever Joe Blanton to drive in Pivetta in the fifth to build the lead to 4-0.
But the Nationals got on the board in the fifth as Trea Turner hit a two-run homer to trim the margin to 4-2. Zimmerman tied it 4-4 with a two-run double up the alley in right-center field to chase Pivetta.
Roark had his shortest outing of the season, going 4 2/3 innings and allowing four runs and six hits while throwing 110 pitches. Pivetta also went 4 2/3 innings, yielding four runs, four walks and five hits before Luis Garcia got the last out in the fifth.
"He is out to win the game; he has that kind of bat," Mackanin said of Harper. "He was looking for a heater out over the plate that he can get. It was pretty much down the middle, above the knees. You have to give him credit."
NOTES: RF Bryce Harper was already under team control through the 2018 season with the Nationals. But the National League East division leaders took a step to a possible long-term deal when the team announced a 2018 contract agreement. Harper was arbitration eligible after the 2017 season, but Washington took an unusual step of coming to terms with the Las Vegas native before the season ends. The deal for 2018 is worth about $21.625 million, according to several sources, including MLB.com and Mid-Atlantic Sports Network (MASN). Harper is still eligible for free agency after the 2018 season. The amount is a record for an arbitration-eligible player. ... Washington LHP Gio Gonzalez (3-1, 2.64 ERA) will face Philadelphia RHP Jeremey Hellickson (4-1, 3.49) on Sunday afternoon. Washington RHP Max Scherzer (4-2, 2.59) will oppose Philadelphia RHP Vince Velasquez (2-3, 5.94) in the nightcap. The two games are the result of a Friday rainout. ... Washington LF Jayson Werth, who started the game, was replaced in the field in the top of the eighth inning by Chris Heisey. Werth has a groin injury, according to manager Dusty Baker, and is day to day.