WASHINGTON — Max Scherzer allowed two hits over eight innings and Bryce Harper’s two-run double Thursday night helped the Washington Nationals avoid a four-game home-and-home sweep with a 4-0 victory against the Baltimore Orioles.

Scherzer (14-7) struck out 10 and didn’t walk a batter. He retired 12 straight after Adam Jones’s fourth-inning double and 21 of 22 before Mark Trumbo’s leadoff single in the eighth.

Jayson Werth’s solo home run staked Washington to a 1-0 lead. Daniel Murphy’s RBI double in the eighth came before Harper’s second hit helped the Nationals pull away.

The Nationals had lost four straight, including three in a row to the Orioles, who won twice in Baltimore before the teams shifted to Washington.

ROYALS 5, MARLINS 2: Alcides Escobar homered and drove in two runs to lead Kansas City at Miami.

Salvador Perez and Kendrys Morales also drove in runs for the Royals, who have won 15 of 18 to pull within four games of the second AL wild-card spot.

AMERICAN LEAGUE

TIGERS 8, TWINS 5: James McCann had a three-run homer among his four hits, Daniel Norris pitched into the seventh inning and Detroit completed a sweep at Minneapolis for the Twins’ seventh straight defeat.

Norris (2-2) struck out five in 61/3 innings, allowing six hits without a walk in his longest and strongest start this season. He took a shutout in the sixth, surrendering RBI singles by Robbie Grossman and Eduardo Escobar over his last two innings.

ANGELS 6, BLUE JAYS 3: Albert Pujols reached the 100-RBI mark for the 13th time, the fifth player in history to achieve the feat, Mike Trout had three hits and drove in four runs, and Los Angeles won at Toronto.

Jered Weaver pitched 52/3 innings to snap a three-start losing streak as the Angels won consecutive games for the first time since Aug. 2-3 and prevented J.A. Happ from becoming the first 18-game winner in the majors.

RANGERS 9, INDIANS 0: Cole Hamels allowed two singles over eight innings for his 14th victory as the AL-best Rangers won at Arlington, Texas, in the opener of a four-game series matching division leaders.

Hamels (14-4) retired 19 straight batters after Francisco Lindor’s solid two-out single to left in the first. The only other baserunner for the Indians was Carlos Santana after a leadoff hit in the eighth, though he was stranded at second after advancing on a passed ball.

WHITE SOX 7, MARINERS 6: Todd Frazier tied it with an RBI single in the seventh inning and won it with a line drive down the left-field line in the ninth to lift Chicago at home.

Adam Eaton led off the ninth with a bloop single off Nick Vincent (3-4) and went to second on Tim Anderson’s sacrifice. Jose Abreu was walked intentionally before Frazier’s liner over third scored Eaton, leading to a pileup of players behind the pitcher’s mound.

NATIONAL LEAGUE

METS 10, CARDINALS 6: Alejandro De Aza homered and drove in five runs to lead New York at St. Louis.

PIRATES 3, BREWERS 2: Andrew McCutchen hit a home run and a pair of RBI singles, including the tiebreaker in the 10th inning as Pittsburgh stopped a nine-game skid at Miller Park in Milwaukee.