WASHINGTON (AP) Bryce Harper got a pitch to hit with the game on the line Friday night.
He sent it over the fence.
Harper slugged a tiebreaking, two-run homer in the seventh inning, sending the Washington Nationals over the Miami Marlins 5-3.
Harper, playing while he appeals a one-game suspension for his behavior following an ejection on Monday, walked his first two times up and singled in the fifth.
It was 2-all when Anthony Rendon drew a leadoff walk. Harper followed by working the count full against Kyle Barraclough (2-1), then hitting his 11th home run.
''I was just trying to stay within myself every time,'' said Harper, who has walked 20 times in his last eight games.
''It's definitely tough, but just trying to do some damage when I can and let the guys behind me work when they can.''
Barraclough, in his second year in the majors, has given up just two home runs, both to Harper.
''I'm going to pitch to him,'' said Barraclough, who left a slider in the strike zone on 3-2. ''I'm not going to shy away. I accept the challenge and he won this one.''
Miami had no left-handers in its bullpen to face the lefty Harper.
''In that situation there I don't feel handicapped because it's what we've been doing all year,'' Mattingly said of using Barraclough in the seventh.
Stephen Drew had a two-run, pinch-hit homer in the Nationals sixth that made it 2-all. Pinch hitter Chris Heisey added a solo homer in the eighth.
Blake Treinen (3-1) pitched two innings and Jonathan Papelbon got the final two outs for his 10th save.
Giancarlo Stanton had a double and a single for Miami.
Mattingly called on right-hander Bryan Morris to face the lefty Drew with two outs in the sixth. Drew hit his second homer of the season.
A leadoff walk and two errors by second baseman Daniel Murphy led to two Miami runs in the fifth.
Murphy botched a potential double-play grounder with no outs, and later threw wildly to first base when Gonzalez and first baseman Ryan Zimmerman converged near the bag on a play that culminated with two Marlins coming in to score.
The first three Marlins singled off Washington starter Gio Gonzalez to load the bases in the sixth, but relievers Yusmeiro Petit and Oliver Perez picked up a strikeout and a double play.
''I think with our bullpen this year we definitely all feed off each other,'' Papelbon said. ''Every good bullpen that I've been a part of always feeds off of each other, and we have that makeup.''
Following Max Scherzer's 20-strikeout effort Wednesday night, Gonzalez allowed only one baserunner through four innings. He went five innings plus three batters, allowing two unearned runs and striking out seven with two walks.
Marlins starter Tom Koehler was charged with a run on six hits in 5 2/3 innings. He struck out four and walked five.
Friday night marked the first time in Nationals history (2005-present) that they've gotten two pinch-hit homers in a game. They have six on the season. ''These guys they work hard and they hit a lot and they have a lot of pride coming off the bench, and they're proud of what they're doing as a unit,'' manager Dusty Baker said.
RECORD SAVE FOR PAPELBON
With the save, Papelbon moved into sole possession of 10th place on the all-time career saves list with 359, passing Troy Percival.
Miami's Marcell Ozuna extended his hitting streak to 12 games with a sixth-inning single.
Marlins: Mattingly said LH reliever Joe Beimel, signed by Miami on Wednesday, was undergoing his physical Thursday before reporting to extended spring training.
Nationals: Gonzalez took a single from J.T. Realmuto off his lower right leg in the fifth, but stayed in the game.
Washington RHP Stephen Strasburg makes his first start since agreeing to a seven-year, $175 million deal Tuesday in the opener of Saturday's day-night doubleheader. Strasburg (5-0, 2.76) will be opposed by LHP Justin Nicolino (2-0, 2.79).