ARLINGTON, Texas (AP) — Jurickson Profar had a bases-clearing double to put the Texas Rangers ahead to stay in a wild, series-clinching 12-10 win over the New York Yankees, who matched a major league record with four more homers Wednesday night.

Gleyber Torres became the youngest Yankee ever to homer in three consecutive games and Aaron Judge hit a 471-foot blast as New York became only the third team in major league history with 21 homers in a five-game stretch — 12 of those in Texas.

Torres, a 21-year-old second baseman playing in his 27th career game, and Judge both homered during a six-run fifth to put New York ahead 10-5. The Rangers then scored twice in the bottom of the fifth, and an inning later got Profar’s three-run double to make it 11-10 after reliever David Robertson (3-2) had already given up a bases-loaded walk.

Didi Gregorius and Neil Walker also went deep for the Yankees, who have at least three homers in five consecutive games for the first time in team history. The only other teams with 21 homers in a five-game span were the 1999 Reds and the 1977 Red Sox, according to the Elias Sports Bureau.

Rangers rookie Ronald Guzman also homered in his third straight game, a three-run blast in the fifth off starter CC Sabathia after Nomar Mazara had a two-run shot earlier in the inning.

Alex Claudio (2-2), the third of six Texas pitchers, struck out three in 1 2/3 scoreless innings. Keone Kela struck out the side in a perfect ninth for his 10th save in 10 chances.

The Yankees are 5-5 since a 17-1 stretch.

Texas is 9-17 at home this season but took two of three against New York and has won consecutive home series for the first time this season. The Yankees had won their last four road series.

TRAINER’S ROOM

Yankees: 1B Greg Bird (right ankle surgery), who could make his season debut with the Yankees this weekend, hit a two-run homer in his rehab game at Triple-A Scranton/Wilkes-Barre. … C Gary Sanchez was held out of the starting lineup after coming out of Tuesday night’s game because of calf cramps. He struck out as a pinch-hitter in the ninth inning against Kela.

Rangers: OF Carlos Tocci has been sent to Triple-A Round Rock from Double-A Frisco to continue his rehab from a bruised left hip that has caused him to miss 28 games.

UP NEXT

Yankees: After completing only five games in 10 days since their last home game, the Yankees have the day off Thursday before opening a three-game weekend series at home against the Los Angeles Angels.

Rangers: RHP Austin Bibens-Dirkx, who was 32 last May when he made his major league debut after 318 games over 12 minor league seasons, is set for his 2018 season debut in the opener of a four-game home series against Kansas City on Thursday night. He will be recalled from Triple-A Round Rock. Lefty Danny Duffy (1-6) is scheduled to start for the Royals.

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)

Watch & Listen LIVE