The Washington Nationals hope to make it two straight wins on Thursday when they begin a four-game set with the St. Louis Cardinals at Nationals Park.

Washington put the brakes on a five-game losing streak on Wednesday, as Bryce Harper hit two home runs in a game for the first time in his young career and the Nationals avoided a two-game sweep with an 8-4 win over the Miami Marlins.

Harper had a two-run homer and a solo blast before he was ejected in the ninth inning for slamming his helmet to the ground after hitting into a double play.

"We're still the team in first place," Harper said. "Everybody is getting ahead of everything and saying we're struggling. We went through a skid. That happens. Everybody is trying to catch us. It's harder for them."

The Nationals, shut out 9-0 in the opener of the two-game series Tuesday, had 13 hits. The NL East leaders also upped their advantage in the division to five games on the Atlanta Braves, who lost in San Diego.

"A little something for everybody in that one," said Nationals manager Davey Johnson. "A great win. Makes the trip home easier."

Getting the call on Thursday for the Nats will be righty Edwin Jackson, who is 7-9 with a 3.72 ERA. Jackson lost his second straight start and fell for the third time in four decisions on Friday in Philadelphia, as he allowed three runs and seven hits in six innings.

Jackson, who was an integral part of the Cardinals' World Series title last season, is 0-2 against his former team with a 3.54 ERA in five games (4 starts).

The Nationals aren't the only team scuffling at the moment, as St. Louis enters this set on the heels of a series loss to the Pittsburgh Pirates that culminated with a 5-0 loss on Wednesday.

Joe Kelly (4-6), who replaced the inconsistent Lance Lynn in the rotation, surrendered five runs on eight hits and three walks over five innings to take the loss.

St. Louis, which also lost, 9-0, on Tuesday, is now just a game up on the Pirates for the second wild card spot in the National League.

"We've seen quite a bit of this year, it's been a lot of feast or famine," St. Louis manager Mike Matheny said. "It's hard to understand it because we certainly have the ability to put something up there every night."

The Cardinals were also without catcher Yadier Molina, who was injured in a home-plate collision on Tuesday night. The team had hoped he would be ready, but decided to err on the side of caution.

"We'll take off tonight, and tomorrow, we'll see how I feel," said Molina. "My neck is sore. My head (pain), it went away. My shoulder pain is fine. It's just my neck that's a little stiff. Not too bad, that's what I say."

Hoping to get the Cardinals back into the win column on Thursday will be lefty Jaime Garcia, who has lost his last three decisions and is winless in his last five starts. Garcia absorbed the loss on Saturday in Cincinnati, as the Reds battered him for four runs and seven hits in six innings to drop him to 3-5, while raising his ERA to 4.15.

Garcia has faced the Nationals three times and is 2-0 with a 1.65 ERA in those outings.

Washington was 4-2 versus the Cardinals last season.