WASHINGTON -- Bryce Harper likes to play when there's a lot on the line, and he came through in one of those situations Thursday night.
Harper hit a three-run homer in the first inning, and starter Gio Gonzalez and the bullpen made it stand up as the Washington Nationals posted a 3-2 victory over the Miami Marlins.
The victory kept alive Washington's faint hopes for a playoff berth. Because Cincinnati was idle, the Nationals (82-71) pulled within five games of the Reds for the final National League wild-card spot. Both teams have nine games remaining.
Washington also saw Denard Span's 29-game hitting streak end. Span went 0-for-4, snapping the longest hitting streak in the major leagues this year. A hit would have tied Span with Ryan Zimmerman for the team's longest run, a record set in 2009.
However, Harper's big hit proved enough for Washington. He crushed a three-run shot off Miami starter Henderson Alvarez (4-5) to gave the Nationals a 3-1 lead, and they never trailed again.
"I like playing in pressure situations where we need to play hard and play the game the right way and really be on point every night," Harper said. "I have fun in those situations, and I thrive off of playing in pressure situations."
Alvarez drilled Ian Desmond, the next batter after Harper, on the arm on a 3-0 pitch. That prompted plate umpire Bill Welke to immediately issue warnings to both benches. Moments later, Welke threw out Nationals bench coach Randy Knorr as both teams argued.
"A warning doesn't do anything," Nationals manager Davey Johnson said. "But it's real obvious when you give up a home run and then you get 3-0 on a guy and you drill him. I think the proper thing is to eject him."
The early support proved crucial to Gonzalez (11-7), who gave up two runs and seven hits in six innings to celebrate his 28th birthday in style.
He allowed single runs in the first and sixth and worked out of a few other jams. The left-hander stepped in for scheduled starter Stephen Strasburg, who was pushed back to Saturday because of concerns about his right forearm.
Gonzalez said the Harper homer made things easier for him.
"It means everything," Gonzalez said. "I got myself in tough situations, but at the same time, got out of it. I just didn't want to let this team down."
Drew Storen (seventh) and Tyler Clippard (eighth) combined to take care of the next two innings and set up closer Rafael Soriano, who locked up his 42nd save with a scoreless ninth.
The Marlins (56-97) left 10 on base.
Justin Ruggiano's RBI single cut the Washington lead to 3-2 in the sixth. Miami then put runners on first and third with two outs in the seventh against Storen, but Christian Yelich flied out.
The Marlins drew two walks off Soriano and had runners on first and second with two outs in the ninth, but Yelich struck out to end the game.
The Marlins didn't waste any time taking an early lead. Donovan Solano doubled off Gonzalez to start the game, and Ed Lucas followed with an RBI single to center for a 1-0 lead after just two batters.
The advantage didn't last long. Zimmerman (single) and Jayson Werth (walk) both reached in the bottom of the inning before Harper's one-out blast.
"That ended up being the game," Miami manager Mike Redmond said. "Three-run home run and that was it. Unfortunately for us, we've had that scenario happen several times."
NOTES: The Nationals acquired minor league LHP Matthew Spann from the Tampa Bay Rays to complete the David DeJesus trade from Aug. 23. Spann had a 4-3 record with Class A Bowling Green this season. ... Harper's home run was his first homer this month. His last one came Aug. 29 against Miami. ... The Marlins fell to 0-7 at Nationals Park this year. ... Lucas, who went 3-for-5, has at least two hits in five consecutive games. He's 11-for-23 (.478) in that span.