ST. LOUIS -- Koda Glover rewarded his manager's faith.
Bryce Harper had three hits and drove in three runs, Glover earned the save in the first opportunity since Ryan Madson was placed on the disabled list, and the Washington Nationals snapped a four-game losing streak with a 5-4 victory over the St. Louis Cardinals on Thursday night.
The Nationals won for just the third time in their last 10 games and snapped the Cardinals' season-high, eight-game winning streak.
"We needed a win today," Nationals manager Dave Martinez said. "Get on that plane, have a nice happy flight and come back tomorrow and be at home and be ready."
Tanner Roark (8-12) gave up four runs, three earned, in six innings.
A beleaguered bullpen that had blown two leads to start the losing streak took care of the rest. Justin Miller pitched two scoreless innings before Glover closed it out.
"There's been a lot of changes (in the bullpen)," Miller said. "It's unfortunate, a couple of injuries and stuff like that, but I don't really look at it as I've got the seventh or eighth or anything like that. I'm just going out there just trying to do my job."
Glover took the loss in the series opener on Monday, giving up a game-ending homer to Paul DeJong.
"The first game of the series didn't go as I would have liked for it to have went," Glover said. "So to get put back in that situation or even a better situation to get a save, I'm happy with that outcome."
Harper drove in the game's first run with a double in the first and knocked in two more with a bases-loaded single in the fourth to give the Nationals a 4-1 lead.
A pair of errors helped the Nationals extend their lead to 5-1 in the fifth. St. Louis committed three errors in the game after committing just four total errors during the winning streak.
"A couple plays clearly we expect to make and will make and just didn't go our way for a little bit there," Cardinals interim manager Mike Shildt said. "To the guys' credit they regrouped, settled down, and started playing back to the baseball they know they can play."
The Nationals had opportunities to pad the lead, leaving the bases loaded in the third and fifth while stranding nine runners in the first five innings.
"When you have an opportunity to put teams away you've got to do that," Martinez said. "Especially with how hot the Cardinals are playing right now. They're going to come back."
The Cardinals got within one in the sixth. After DeJong and Kolten Wong came up with back-to-back, two-out RBI hits, Harrison Bader hit a slow grounder to third. Anthony Rendon's throw to first got away from Ryan Zimmerman for an error, allowing Wong to score from second to cut the Nationals' lead to 5-4.
Just two of the four runs Luke Weaver (6-11) allowed in his 3 2/3 innings were earned. He gave up seven hits, including two to Roark, who scored both times.
Tyson Ross allowed one unearned run in 3 1/3 innings of relief.
Bader homered in the third and Matt Carpenter walked twice to extend his on-base streak to a career-high 34 games.
Nationals: RHP Jeremy Hellickson will have an MRI on his sore right wrist on Friday. RHP Joe Ross (right elbow surgery) threw 3 2/3 scoreless innings at Class A Potomac on Thursday and is hoping for a September return.
Cardinals: RHP Carlos Martinez (right shoulder strain) will begin a rehab Friday at Double-A Springfield. RHP Adam Wainwright (right elbow inflammation) threw two scoreless innings Thursday night at High-A Palm Beach.
Nationals: RHP Max Scherzer (15-5, 2.19 ERA) will take the mound as the Nationals return home for a three-game series Friday night against the Miami Marlins and RHP Dan Straily (4-5, 4.42 ERA). Scherzer is 3-0 with a 3.43 ERA in three starts this season against the Marlins.
Cardinals: RHP Jack Flaherty (6-6, 3.22 ERA) kicks off a three-game series Friday night as the Cardinals host the Milwaukee Brewers and RHP Freddy Peralta (5-3, 4.47 ERA). Flaherty struck out a career-high 13 batters in his last start against the Brewers on June 22.
Adam Wainwright pitched two-hit ball over six innings for his first win in five months, Marcell Ozuna homered and the St. Louis Cardinals salvaged the finale of a four-game series with a 5-0 victory over the Los Angeles Dodgers on Sunday night.
The Philadelphia Phillies and New York Mets start their final series of the season Monday night at Citizens Bank Park with the Phillies are still clinging to slim playoff hopes and the Mets playing their best baseball since April.
The rivalry between the Toronto Blue Jays and the Baltimore Orioles has been lopsided this season.
Adam Wainwright strikes out nine, allowing just two hits over six scoreless innings.
At age 35, Justin Verlander is having one of his finest seasons and has been at his best when the Astros need him most.
Christin Stewart, a September call-up, is getting a chance to play regularly as the Detroit Tigers' season winds down.