NEW YORK — Chase Headley scored on a passed ball with two outs in the bottom of the ninth, and the Yankees won in their final at-bat for the second straight game to beat the Texas Rangers 2-1 on Thursday.

Four New York pitchers combined to strike out 16 Rangers as the teams split the four-game series. Didi Gregorius, who had the winning home run Wednesday night, hit a solo shot in the fifth to tie the score after Shin-Soo Choo homered to lead off the game.

Tony Barnette (5-3), the third Rangers reliever of the afternoon, walked Headley to lead off the bottom of the ninth. With runners on second and third and two outs, his pitch got through catcher Robinson Chirinos and Headley just beat the throw.

Aroldis Chapman (2-0) earned the win with a scoreless ninth.

INDIANS 4, BLUE JAYS 1: Carlos Carrasco struck out a season-high 14, Jason Kipnis and Rajai Davis hit solo home runs, and visiting Cleveland matched a franchise record by winning its 13th straight game.

Cleveland’s streak is the longest by any team this season, and the longest for the Indians since winning 13 straight in 1951. Cleveland also won 13 in a row in 1942.

Indians starting pitchers are 10-0 during the streak, and Cleveland has outscored opponents, 80-26.

WHITE SOX 6, TWINS 5: J.B. Shuck’s two-out single scored the tiebreaking run in the eighth inning and Todd Frazier hit his 23rd home run as Chicago won at home.

Fernando Abad (1-2) got the first two batters in the eighth before consecutive walks.

Shuck’s career high-tying third hit of the game scored Avisail Garcia from second.

TIGERS 10, RAYS 7: Cameron Maybin capped a dramatic eight-run ninth inning with a tiebreaking three-run double, and Detroit overcame a five-run deficit to win at St. Petersburg, Florida.

NATIONAL LEAGUE

DODGERS 8, BREWERS 1: Trayce Thompson, Yasmani Grandal and Corey Seager hit home runs, leading Los Angeles to a win at Milwaukee.

Kenta Maeda (7-5) held the Brewers to one run over six innings as the Dodgers won the season series from the Brewers, five games to two.

METS 4, CUBS 3: Yoenis Cespedes socked a colossal home run, Jeurys Familia pitched out of a huge jam in the ninth inning and rookie replacement Brandon Nimmo keyed a three-run rally in the seventh that sent host New York past Chicago in their first meeting since last year’s NL Championship Series.

New York, which swept Chicago last October to reach the World Series, had lost nine straight regular-season games to the Cubs dating to August 2014.

NATIONALS 13, REDS 4: Danny Espinosa hit a grand slam and a three-run homer to finish with a career-high seven RBI as host Washington cruised to its fifth straight victory.

INTERLEAGUE

ROYALS 4, CARDINALS 2: Kendrys Morales homered and recorded his sixth straight multi-hit game in a win at St. Louis.

Kansas City won for the fourth time in five games and took the two-city, four-game series three games to one.