WASHINGTON (AP) Jonathan Schoop and Matt Wieters hit two-run homers and the Baltimore Orioles completed a three-game sweep of the Washington Nationals with a 5-4 victory Thursday.

Baltimore entered Thursday four games out of the second AL wild-card spot, while Washington began the day 6 1/2 games behind the NL East-leading New York Mets.

This was a makeup of a game postponed Monday because of rain.

More from FoxSports

Manny Machado's RBI single in the first inning and Schoop's two-run shot in the fourth gave the Orioles a 3-0 lead.

But Wilson Ramos' homer and Yunel Escobar's two run-scoring hits helped the Nationals go up 4-3.

Blake Treinen (2-4) came on for the eighth as Washington's fourth pitcher. Steve Pearce singled and Wieters followed with his seventh homer.

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.

DODGERS 6, DIAMONDBACKS 3

LOS ANGELES (AP) - Chris Heisey hit a grand slam in a six-run fifth inning and Los Angeles trimmed its magic number to four for the NL West.

Los Angeles increased its division lead to 7 1-2 games over the San Francisco Giants, who faced San Diego later.

Clayton Kershaw (15-7) had nine strikeouts while yielding six hits and three runs over five innings. He left trailing 3-0, but ended up with his fifth victory in six starts when the Dodgers rallied for their second straight win.

Howie Kendrick had a two-run single for the Dodgers.

Rookie Brandon Drury homered off Kershaw, and Paul Goldschmidt got his 19th RBI in his last 19 games against the Dodgers. Arizona would have to win its final nine games to avoid its fourth consecutive non-winning season.

Kenley Jansen pitched the ninth for his 34th save.

Patrick Corbin (6-5) was in control until the fifth inning of his second loss to the Dodgers in 12 days.

RANGERS 8, ATHLETICS 1

OAKLAND, Calif. (AP) - Cole Hamels pitched six innings to earn his fifth consecutive win and Prince Fielder hit his 22nd homer as Texas completed a three-game sweep.

The Rangers moved a season-high 14 games over .500 and extended their lead to 3 1/2 games over the idle Houston Astros in the AL West.

Adrian Beltre drove in three runs, and Delino DeShields had three hits and two RBIs for Texas.

Hamels (11-8) gave up an unearned run in the second and improved to 5-1 in 10 starts with the Rangers. Hamels allowed four hits, walked three and struck out two.

Josh Reddick singled and scored for Oakland, which has lost five straight and dropped 25 games under .500 for the first time since 1997.

Chris Bassitt (1-7) gave up three runs and six hits in three innings.

PIRATES 5, ROCKIES 4

DENVER (AP) - Pedro Alvarez hit a go-ahead, three-run homer in the eighth inning, and Pittsburgh earned their 10,000th win since joining the National League.

A day after clinching a playoff spot for the third straight season, the Pirates reached another momentous milestone.

Starling Marte collected four singles and finished 13 for 20 in the four-game sweep. It's the most hits in a four-game series for a Pirates player since Pie Traynor had 13 in 1928.

Alvarez had the big hit when he homered off Jairo Diaz (0-1).

Reliever Joe Blanton (5-0) earned the win for a second straight game. Mark Melancon pitched a perfect ninth to pick up save No. 50.

Nolan Arenado had a two-run double in his return to the Rockies' lineup. He sat out Wednesday after banging his head on the dirt when he dived for a ground ball Tuesday.