AMERICAN LEAGUE: Game 1: Orioles 5, Yankees 4

Game 2: Yankees 10, Orioles 2

Brett Gardner had four hits, homered and drove in three runs to help the New York Yankees beat the host Baltimore Orioles Monday night for a doubleheader split.

In the opener, Danny Valencia snapped an 0-for-25 skid with a three-run homer off CC Sabathia, and Baltimore ended a six-game losing streak with a 5-4 victory.

The split left the Yankees a 4-4 record against Baltimore and dropped them 2½ games behind first-place Boston in the AL East.

The first game ended with Gardner grounding out as a pinch hitter with the potential tying run on third base. He returned in the nightcap to torment the Orioles at the plate and in center field, where he made several fine, running catches.

Gardner led off with a single off Jefry Ramirez (0-3) and scored on a double by Didi Gregorius. In the fourth, Gardner hit his seventh homer, a two-run drive that made it 3-0.

That was enough offense for Luis Cessa (1-1), who allowed three hits over six shutout innings.

A four-run eighth —highlighted by Austin Romine’s two-run homer and an RBI double by Gardner — ended any doubt.

Red Sox 5, Rangers 0

J.D. Martinez hit his major league-leading 28th home run, Steve Pearce added a two-run shot and Eduardo Rodriguez pitched 5⅔ innings to lead the Boston Red Sox to a victory over the visiting Texas Rangers and their seventh straight win.

The Red Sox won for the 14th time in 17 games to end the day with their biggest lead over the Yankees in the AL East since April. Boston led New York, which lost the opener of a doubleheader in Baltimore, by three games pending the outcome of the nightcap.

Pearce, who was acquired from the Toronto Blue Jays last month, lined a 3-2 pitch into the Monster Seats with two outs in the first inning to make it 2-0. It stayed that way until Mookie Betts and Andrew Benintendi singled to lead off the eighth and Martinez put one into the Monster Seats to give the Red Sox a 5-0 lead.

That was plenty for five Red Sox pitchers, who combined on a five-hitter.

NATIONAL LEAGUE: 1st game: Mets 4, Phillies 3, 10 innings

Even during this miserable Mets season, Wilmer Flores has displayed quite a knack for winning games on the final swing.

Flores connected for a pinch-hit homer in the bottom of the 10th inning to give host New York a victory over the Philadelphia Phillies in the opener of a doubleheader.

In the makeup of an April 2 game postponed by snow, Flores led off the 10th and nearly reached safely on a hit by pitch. In fact, he contended the ball grazed his arm and he started toward first base. When plate umpire Tom Hallion called ball three, Flores motioned toward the New York dugout to request a replay review.

“It did hit him. We saw it on the replay and then I just talked to him,” Mets starter Zack Wheeler said with a chuckle. “Glad they didn’t overturn it.”

The ruling stood following the review — but Flores did one better. He drove the next delivery from Victor Arano (1-1) off the left-field foul pole for his fourth career game-ending homer and second this season.

Pirates 6, Nationals 3

Gregory Polanco drove in four runs in the first two innings and the host Pittsburgh Pirates went on to a victory over the Washington Nationals.

Polanco hit a two-run double in the first as the Pirates started the game with four straight hits, then added a two-run home run in the second, his 13th of the season to extend the lead to 6-1.

Ivan Nova (5-6) worked around eight hits to hold the Nationals to three runs over 5⅔ innings. He struck out five and did not issue a walk.

Felipe Vazquez pitched the ninth for his 19th save of the season as Pittsburgh won its second straight after a five-game skid.

Juan Soto and Bryce Harper each hit solo home runs for Washington.

Marlins 4, Brewers 3, 10 innings

Backup catcher Bryan Holaday hit a walk-off RBI single with one out in the 10th inning, and the host Miami Marlins beat the Milwaukee Brewers.

Holaday, who came into the game batting .165, was in the lineup because the Marlins placed All-Star catcher J.T. Realmuto on the paternity list before the game in anticipation of the birth of his first child.

Jesus Aguilar gave his All-Star candidacy a boost by hitting his NL-leading 23rd homer for Milwaukee.