For his final act, Harper unleashed a mighty yell as he crossed home plate, scoring the game-winning run on an Ian Desmond single to right field in the 10th inning, two at-bats after he delivered a leadoff double.
The victory snapped a four-game skid for the Nationals, and made the prospects of their subsequent cross-country flight to Washington much more enjoyable.
"That's more like it," manager Davey Johnson said.
Whenever Rafael Soriano stands on the mound with his jersey untucked, it means good news for the Nationals. A day after he blew his third save of the year and agreed that Harper misplayed a fly ball, allowing the Giants to tie the game en route to a 4-2 win, Soriano pitched a 1-2-3 10th to wrap up the road trip.
Soriano and Harper were giving each other high fives by the end of Wednesday's matinee.
"We talked and everything is fine," Soriano said. "We started from scratch. We're not enemies in here. What happened, happened. Let's move on."
A few minutes before Soriano induced a warning-track fly ball from Marco Scutaro to end the game, Desmond stepped to the plate with a chance to win it. Following Harper's double, the Giants elected to intentionally walk Ryan Zimmerman to face Desmond. The move came back to bite San Francisco, as Desmond sent a 1-1 fastball from Jeremy Affeldt into the right-field gap.
"Numbers may have indicated that was the right move to do," Desmond said of Zimmerman's intentional walk. "But I was 100 percent confident I was going to get the job done right there."
Two innings earlier, Desmond was waiting for Harper in the visitors' dugout. He wanted to give him a hug.
Harper had just ended the eighth with a sliding catch on Pence, his second noteworthy grab of the day, and Desmond couldn't contain his excitement. It was just Tuesday that Harper said he better improve his defense in fear of being sent back to Triple-A.
"He was a little reluctant," Desmond said about the hug. "He didn't really know what was going on. Once I told him I was happy I was going to be able to see him for another day, I think he understood what I was talking about."
Harper tweaked his left knee on the play, the same knee which forced him to sit out last week after a collision with the wall in Los Angeles. With a short bench, Johnson said he talked to Harper about staying in the game, and the young slugger agreed. Harper sported a black sleeve on his left knee in the locker room after the game, but said he was "all right."
"It's a little swollen," Harper said. "But I'll keep doing the same thing, but hopefully the swelling will go down."
Harper's previous nice catch came with two out in the bottom of the sixth, when Pence drilled one to the right-field gap, and Harper gave chase, making a running grab on the warning track.
Despite making Wednesday's play on Pence a night after pulling up short near the wall, Harper admitted last week's collision still hasn't worked its way out of his system just yet.
"It's still in my head," Harper said. "Trying to get past that, but it's going to take time. We'll see how things go."
For most of the afternoon, Harper's sixth-inning solo blast off Madison Bumgarner served as the game's lone run. That's because Gio Gonzalez and Bumgarner were locked in a showcase of two of the game's top southpaws, as each tossed at least seven innings of one-run ball.
Following the contest, both Bumgarner and Harper were complimentary of each other.
"I think he made it pretty clear that he's going to play as hard as he can every day," Bumgarner said. "It's fun to play against guys like that. Most everybody plays that way, but it's fun. He's the kind of player who can bring out the best in you."
Likewise, the 20-year-old Harper was quick to praise the 23-year-old Bumgarner.
"Kid's unbelievable," Harper said. "He's one of the best guys I face all year. He knows what he's doing out there, and the Giants are very lucky to have him. Going out there and facing a guy like Bumgarner is a lot of fun. I look forward to those matchups for hopefully the rest of our careers."
Nationals fans might have had a feeling of "Here we go again," as the game reached its late stages. A day after wasting a seven-inning gem from Stephen Strasburg, Gonzalez's stellar performance also looked to be for naught.
Gonzalez was lifted in favor of Drew Storen after walking Angel Pagan with one out in the eighth, but the right-handed reliever couldn't hold on to a 1-0 lead. Storen walked Marco Scutaro to put Pagan at second base, before giving up a game-tying RBI single to Buster Posey. It erased any chance of Gonzalez earning the win, despite allowing one run on four hits and two walks, striking out five over 7 1/3 innings.
Following the game, Johnson said "everything" appeared to be working for Gonzalez, and that he didn't want to pull him out of the game. Regardless of whether he has the win attached to his name, Gonzalez was just happy to be headed back to Washington.
"It's going to be a good flight back home," Gonzalez said.