NEW YORK (AP) — Gary Sánchez rebounded from poor defensive play with a go-ahead home run, four pitchers combined for scoreless relief and the New York Yankees gained in the AL wild-card race with a 4-3 victory over the Texas Rangers on Monday night.

Sánchez put the Yankees ahead in the second inning against rookie A.J. Alexy (2-1) with his 22nd home run.

His play behind the plate contributed to three defeats during New York’s fall from playoff position: Sánchez failed to tag a runner against the Mets despite catching the throw in plenty of time, allowed a pair of ninth-inning wild pitches at Baltimore and missed a foul popup in a seven-run inning by Cleveland.

With a harvest moon rising above Yankee Stadium, New York built a 4-0 lead before the Rangers closed the gap in a three-run fifth against Nestor Cortes.

Chad Green (8-7) retired five straight batters, Clay Holmes and Joely Rodríguez combined for the seventh and eighth, and Aroldis Chapman got three straight outs for his 28th save in 32 chances.

New York moved within a half-game of Toronto for the second AL wild card and with 11 games left is two back of Boston, the league’s wild-card leader. The Yankees had lost 15 of 22 following a 13-game winning streak.

Run-scoring hits by Aaron Judge and Gleyber Torres around Giancarlo Stanton’s sacrifice fly built the lead in a three-run third. Alexy stranded the bases loaded by striking out Brett Gardner.

Cortes pitched shutout ball until the fifth, when Charlie Culberson led off with a home run. Leody Taveras and Isiah Kiner-Falefa hit consecutive doubles, Green threw a wild pitch that Sánchez hardly moved for, and rookie standout Adolis García hit a sacrifice fly.

Cortes, 0-1 in his last five starts, allowed three runs and five hits in 4 1/3 innings with seven strikeouts.

Alexy, making his third big league start, allowed four runs, four hits and six walks in 3 1/3 innings. The Rangers dropped to 55-95, on track for their first 100-loss season since 1973.

CATCHING IT

Yankees manager Aaron Boone defended Sánchez and credited him with improvement. “Sometimes because Gary is the lightning rod that he seems to be sometimes, a play or two really torpedoes some of that or changes that narrative, and that’s not necessarily fair,” Boone said. “I think it’s important to acknowledge the strides that he has made in every facet on the defensive side while also acknowledging a couple of big mistakes this week, without question.”

OLD FRIENDS

Joey Gallo went 0 for 3 with a walk after missing 1 1/2 games with a sore neck, returning to play for the first time against the team that traded him to the Yankees in July.

“It’s crazy. It’s weird being on the other side,” he said. “It brings a lot of emotion, a lot of memories.”

Gallo went to the Rangers’ locker room on the third-base side before batting practice.

“He came across enemy lines in our clubhouse and I got to see him in person, which was cool,” Rangers manager Chris Woodward said.

TRAINER’S ROOM

Yankees: RHP Domingo Germán (right shoulder inflammation) could be activated as soon as Tuesday. Jameson Taillon (right ankle tendon) could throw in a minor league game Wednesday. ... RHP Luis Severino (Tommy John surgery) was activated for the first time since 2019 but didn’t pitch.

UP NEXT

LHP Jordan Montgomery (5-6, 3.63 ERA), coming off a career-high 12 strikeouts in a no-decision at Baltimore, starts Tuesday night against Texas RHP Dane Dunning (5-8, 4.28).

___