Marcus Semien is congratulated by third base coach Jacob Latz as...

 Marcus Semien is congratulated by third base coach Jacob Latz as Semien runs the bases on a solo home run during the eighth inning against the Texas Rangers in Arlington, Texas. Credit: AP/LM Otero

ARLINGTON, Texas — Marcus Semien hit a tiebreaking homer in the eighth inning against his former team and Brett Baty added a pinch-hit grand slam in the ninth as the Mets beat the Texas Rangers, 7-2, on Wednesday night.

Rookie righthander Nolan McLean (12-10) allowed two runs and three hits over seven innings for the last-place Mets (73-85), who have won both games in Texas since ex-interim manager Andy Green was given the full-time position Tuesday.

The Rangers (78-80) have lost three consecutive games and trail first-place Houston by a half-game in the AL West, with the Astros playing later in Seattle. They own the head-to-head tiebreaker over Texas if the teams finish with the same record.

Semien, traded by the Rangers to the Mets last November for Brandon Nimmo, launched his 15th homer this season off All-Star closer Jacob Latz (3-4) to give the Mets a 3-2 lead. Semien’s first homer since Aug. 7 snapped an 0-for-13 slump.

Latz entered with two on and one out in the seventh, the first time he’s appeared before the eighth inning since April 12.

The Mets took a 2-0 lead in the third when Juan Soto followed Francisco Lindor’s two-out single with his 27th home run off starter Cody Bradford. It was Soto’s sixth homer this year against lefthanded pitching.

After that, Soto was intentionally walked three times — twice with runners on first and second and a lefthander on the mound.

Texas tied the score at 2 in the fifth after McLean retired the Rangers’ first 12 batters. Nimmo, who spent 10 seasons with the Mets, led off with a sharp single to rightfield. He advanced to second on Ezequiel Duran’s groundout and scored on Jake Burger’s single. Evan Carter drove in the tying run when he beat out a potential double-play grounder.

The Mets left the bases loaded in the fifth and seventh after Soto was intentionally walked. He was given another free pass with first base open and two outs in the ninth, but Bo Bichette then walked against Trevor Williams to load the bases before Baty went deep.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME