WASHINGTON (AP) — After all the hubub of a night earlier, Bryce Harper's prediction that he would get plunked by pitch did not come true.

He didn't get a hit, either.

Harper went 0 for 3, grounding into a double play and getting walked twice, in the Washington Nationals' 5-4 loss to the Baltimore Orioles on Thursday that completed a three-game sweep. The series marked the first time this season the front-runner for the NL MVP award has been hitless in three consecutive games.

"It's disappointing," Nationals manager Matt Williams said, "that we didn't win these games."

Washington entered the day 6 1/2 games behind the NL East-leading New York Mets.

"It's not great," Williams conceded. "Not where we want to be."

Asked to characterize the Nationals' mood after their bullpen blew yet another lead, Ian Desmond said: "Frustrated. But as long as we have a chance, there's still hope."

There were no beanballs and no brawl, a day after Washington closer Jonathan Papelbon hit Manny Machado with a pitch in the ninth, two innings after Machado hit a go-ahead two-run homer off Max Scherzer to give Baltimore a 4-3 victory.

That led Harper to surmise: "I'll probably get drilled tomorrow."

Even as much of the pregame chatter Thursday centered on that possibility, both managers tried to downplay such speculation.

"Retaliation? You're not supposed to do that," Baltimore's Buck Showalter said. "The best retaliation would be to win another game, right? That's usually how it works."

And so that's what his club did, thanks in large part to Matt Wieters' two-run homer off Blake Treinen (2-4) in the eighth inning.

"Winning three games," Showalter said afterward, 'is the best 'back at ya.'"

Both clubs hold the slimmest of playoff hopes: Baltimore entered Thursday four games out of the second AL wild-card spot.

But the Orioles have won 11 of their past 15 games to at least keep themselves within shouting distance.

The Nationals have won only seven of their last 16 games.

Baltimore went ahead 3-0 on Machado's RBI single in the first and Jonathan Schoop's two-run shot in the fourth. But Wilson Ramos' homer and Yunel Escobar's pair of run-scoring hits helped the Nationals go up 4-3 entering the eighth.

Steve Pearce greeted Blake Treinen (2-4) with a single, and Wieters followed with his seventh homer, putting the Orioles out front for good.

"I haven't hit one good for a few weeks," Wieters said.

Treinen blamed poor location for a pitch that stayed up.

"Nobody wants to fail, especially with the implications that we're still in the race," Treinen said.

Mike Wright (3-5) got two outs in the seventh for the victory. Brad Brach threw a scoreless eighth, and Darren O'Day pitched the ninth for his sixth save of the season and third of the series. Harper's groundout to Machado ended it.

Another chance for Harper came in the fifth, when Washington scored twice and had a man on first with one out as Harper came up to face rookie starter Tyler Wilson. A comebacker set up an inning-ending 1-6-3 double play.

Washington could have scored more in the seventh, but Anthony Rendon was thrown out at home by second baseman Schoop on a relay from center fielder Gerardo Parra. And in the eighth, Clint Robinson led off with a double but was thrown out at third by Wieters on Desmond's attempted sacrifice bunt.

"Every loss, for me, feels the same," Desmond said.

TRAINER'S ROOM

Orioles: CF Adam Jones (back spasms) was out of the starting lineup for the third consecutive game and had an MRI in Baltimore that showed no structural damage.

Nationals: INF Danny Espinosa is "likely done for the season" because of a torn right hamstring, Williams said.

UP NEXT

Orioles: RHP Kevin Gusman (3-6, 4.26 ERA) will start Friday's opener of a series at the Boston Red Sox, who will send LHP Rich Hill (1-0, 1.93) to the mound.

Nationals: Opening a three-game series against visiting Philadelphia, Washington will start RHP Jordan Zimmermann (13-8, 3.49) against rookie RHP Jerad Eickhoff (1-3, 3.16).