Marlins right fielder Giancarlo Stanton leaps in vain for one of Bryce Harper’s two home runs Wednesday night in Miami. (Marc Serota/Getty Images)

The Washington Nationals had reached their lowest point since the first month of the season. Another loss to the Miami Marlins on Wednesday night and they would be locked in their worst losing streak of the season, a six-game slide, compounding matters by having it come in the heat of a pennant race.

Nationals Manager Davey Johnson called a team meeting before the game, only the second time he had done so this season, to remind his players that he believed in what they could do, a veteran manager exuding confidence in his team.

In Wednesday’s 8-4 win over the Marlins, the Nationals’ skidding offense took its first lead in 48 innings. Slumping rookie Bryce Harper smacked two home runs for the first time in his big league career before he was ejected for spiking his helmet in the ninth inning. The frustrating five-game losing streak vanished like Harper’s home run balls into the right field seats.

While they no longer hold the best record in baseball, the Nationals stayed within one victory of it. More importantly, they gained a game on the Atlanta Braves in the National League East standings, pushing their lead to five. The building pressure dissipated for one night.

“Every team is going to go through a five-, 10-game stretch, even the best teams, where you don’t play so well, and that’s what we went through,” third baseman Ryan Zimmerman said. “It was a good win tonight and now we get to go home for a while.”

Starting pitcher Ross Detwiler was sharp enough over 52 / 3 innings, allowing only three runs, to give his team’s offense a chance to provide a lift. With a two-run lead in the eighth, Drew Storen entered with no outs and two runners on and wiggled out of a jam, essentially securing the win with three dramatic outs.

For days now, the offense has been sputtering. The Nationals, who had found so much success in the season’s second half with home runs, had homered just once and scored a total of six runs during their losing streak.

“Everybody that’s getting ahead of everything and saying we’re struggling right now, we’re just going through the skid and that happens,” Harper said. “I think everybody that’s trying to catch us, it’s harder for them.”

None of the Nationals’ hitters had previously faced Marlins right-hander Jacob Turner, so his arsenal of cutters, curveballs and fastballs was, at first, deceiving. He ran through the Nationals in order the first time. The second time through the lineup, however, was different.

The Nationals led off a four-run fourth inning with a single by Jayson Werth and a Harper home run. After LaRoche singled with one out, Michael Morse smashed a ball off the wall in the deepest part of center field for a run-scoring triple.

“We ran into a couple hot pitchers [in Philadelphia] and then last night we had some chances here and just didn’t take advantage of it,” Zimmerman said. “But tonight to pick up some runs, get everyone going again, kind of have some momentum going back home was huge.”

LaRoche, in a slump of his own over the past two weeks, notched two hits. Ian Desmond added two as well. Each of the Nationals’ top five hitters reached base and scored. Even Kurt Suzuki, the recently acquired catcher who was given the overwhelming task of learning a new pitching staff and opposing pitchers late in a pennant race, added his first home run with the Nationals in the ninth inning. But it was Harper who led the offensive surge.

Harper drilled a cutter across the plate from Turner three rows beyond the right field wall to give the Nationals the lead in the fourth. In the following at-bat, Harper utterly demolished the baseball. His violent swing produced one of his longest home runs, a shot that landed in the upper deck in right field an estimated 425 feet away. Harper’s 14th home run moved him into fourth place all-time for home runs by a teenager, behind Tony Conigliaro, Mel Ott and Ken Griffey Jr.

In his final at-bat, in the ninth inning, a frustrated Harper returned. He rolled over a ball from reliever Heath Bell to first baseman Carlos Lee, who started a double play by throwing to second base. Harper hustled down the first base line and when first base umpire C.B. Bucknor called him out by a step, the rookie spiked his helmet. He was instantly tossed from the game, the first ejection of his major league career.

Following the game, Johnson spoke with Harper.

“He’s just a 100-percenter,” Johnson said. “And he expects great things out of himself. He breaks bats, throws his helmet. He’s just got to stop it. Can’t afford to be losing him in a ballgame with that. He’ll learn.”

Harper admitted he needed to mature in that regard, but added, “When you feel good up there . . .and you miss some pitches you should drive I think that makes you more upset.”

In the eighth inning, Storen inherited two runners in scoring position with no outs and a 6-4 lead. He induced a flyout from Lee, struck out slugger Giancarlo Stanton on a biting slider and got Justin Ruggiano to ground out to end the inning.

“That won the game,” Johnson said.

After the win, the Nationals boarded a plane home to Washington to begin a long but comforting 11-game stretch at Nationals Park. Thirty-two games remain on the schedule, only 12 more on the road. Now that the losing streak was behind them, the worry was no longer about slumps, skids and slides, but of opportunity.