NEW YORK — Masahiro Tanaka pitched six scoreless innings to extend his unbeaten streak to 13 starts, Miguel Andujar hit a three-run homer and the New York Yankees beat Baltimore 6-3 on Tuesday night after the veteran-shedding Orioles dealt away three more players.

Coming off a three-hit shutout of Tampa Bay, Tanaka found his command after a 31-pitch first inning and limited the Orioles to a pair of singles and a double. Tanaka (9-2) struck out eight and walked two, lowering his ERA to 2.00 over his last five starts. He is 7-0 in 13 starts since an April 17 loss against Miami.

New York (68-37) moved 31 games over .500 for the first time since the end of the 2011 season, beating the Orioles for only the sixth time in 11 meetings this year. The Yankees are on their first three-game winning streak since four straight victories from June 18-21.

Run-scoring singles by Gleyber Torres in the first and Greg Bird in the third built a 2-0 lead, and Bird hit a sacrifice fly in the fifth ahead of Andujar’s 13th homer.

Yefry Ramirez (1-4), coming off his first big league win, allowed all six runs and lasted five innings.

NATIONAL LEAGUE

NATIONALS 25, METS 4: In the highest-scoring game in franchise history, Daniel Murphy hit two early home runs and Washington kept pouring it on against emergency reliever Jose Reyes and Mets.

Pitcher Tanner Roark hit a three-run double during a seven-run first inning and Trea Turner had four of Washington’s 26 hits. The Nationals set the team scoring mark dating to their days as the Montreal Expos in 1969.

It was the Mets’ most-lopsided loss in their 57-season history, worse than a 26-7 pounding by Philadelphia in 1985.

Reyes made the first pitching appearance of his career, and the 35-year-old infielder got tagged for home runs to Matt Adams and Mark Reynolds in a six-run eighth. Throwing a fastball in the mid-80s mph and a curve in the upper 40s, Reyes gave up five hits and walked two.

PIRATES 5, CUBS 4: Gregory Polanco hit his team-leading 19th home run, Francisco Cervelli added his 10th of the season and Pittsburgh beat visiting Chicago.

The Pirates won for the 16th time in 20 games by getting to Jon Lester (12-4) in the middle innings and holding on late.

Polanco’s solo homer in the eighth gave Pittsburgh a two-run cushion. The Pirates needed it after closer Felipe Vazquez gave up a single to pinch-hitter David Bote leading off the top of the ninth and Addison Russell followed with a shot to the gap in right-center that scored Bote.

Russell sped to third on the play and was initially ruled safe, but the call was overturned upon review.

Vazquez retired the next two batters to pick up his 24th save in 28 opportunities.

GIANTS 3, PADRES 2: Brandon Crawford singled in the go-ahead run with two outs in the 10th inning and as San Francisco got seven strong innings from rookie right-hander Dereck Rodriguez and won at San Diego, handing the Padres their seventh straight loss.

Andrew McCutchen homered for the Giants, who swept the two-game series and won their third straight game.

San Diego dropped to 2-9 since the All-Star break and lost for the 14th time in 16 games. San Diego is 5-20 in July.

INTERLEAGUE

TIGERS 2, REDS 1: Matthew Boyd allowed four hits in eight scoreless innings, and Niko Goodrum homered in the fourth as Detroit beat visiting Cincinnati.

Homer Bailey (1-8) retired his first 11 batters before Goodrum went deep for his 10th home run of the year. The Tigers never gave up the lead. Boyd struck out seven and walked one before being lifted after 105 pitches.

Shane Greene allowed a run in the ninth but held on for his 22nd save in 25 chances. The game took just 2 hours, 18 minutes.

Boyd (6-9) won his second straight start after going seven in a row without a victory.

RAYS 10, ANGELS 6: Tampa Bay broke through with a seven-run inning and beat Los Angeles despite Mike Trout’s 30th home run.

Trout’s homer, which came off Ryan Yarbrough in the seventh inning, made him the second major leaguer to hit 30 home runs and steal 20 bases in a season three times before the age of 26. The only other player to do it was Willie Mays.