ST. PETERSBURG. Fla. >> Harrison Bader flared a two-run single during a three-run eighth inning, and the New York Yankees rallied from a two-run deficit to beat the major league-leading Tampa Bay Rays 3-2 on Saturday.

Tampa Bay lost for the first time this year in a game in which the Rays scored first. The Rays dropped to 18-3 at Tropicana Field.

A day after hitting a three-run homer, Bader singled as a pinch-hitter in the seventh and put the Yankees ahead 3-2 on his 179-foot, 64.2 mph hit off Kevin Kelly (3-1).

Anthony Rizzo singled against Jalen Beeks, Gleyber Torres singled against Kelly and DJ LeMahieu, after falling behind 0-2 in the count, sliced a slider down the right-field line for an opposite-field RBI double.

Willie Calhoun popped out and Bader, who made his season debut Tuesday after recovering from an oblique injury, looped a hit into short right field.

Ron Marninaccio (1-1) went 1 1/3 scoreless innings to get the win before Ian Hamilton worked around Luke Raley’s two-out double in the ninth for his first major league save, retiring Isaac Paredes on a game-ending flyout.

New York (18-16) moved back within nine games of the Rays (27-7) in the AL East.

The Yankees are without sluggers Aaron Judge (strained right hip), Giancarlo Stanton (left hamstring strain) and Josh Donaldson (strained right hamstring).

The announced crowd was season-high 27,078 at Tropicana Field as the Rays opened up the normally closed upper deck for the weekend series.

Tampa Bay took a 2-0 lead on Manuel Margot’s two-run double off Domingo Germán in the first, a 107.9 mph shot that went between the legs of LeMahieu at third base.

Tampa Bay starter Drew Rasmussen scattered two hits in 5 2/3 scoreless innings.

Beeks worked out of a second and third one-out jam in the seventh by striking out Aaron Hicks and Kyle Higashioka. Hicks, booed by Yankees fans in attendance, went 0 for 5, He is batting .135 (7 for 52) with no extra-base hits, one RBI and 15 strikeouts.

ROCKIES 5, METS 2 >> Touted rookie Ezequiel Tovar had three hits, including a two-run homer, and Austin Gomber won his third straight outing after a terrible start to the season as the Colorado Rockies beat the slumping New York Mets 5-2 on Saturday.

Elias Díaz had a pair of two-out RBI singles, boosting his batting average to .452 (14 for 31) with runners in scoring position, and the last-place Rockies won for the fifth time in six games.

Tylor Megill (3-2) was wild early and late, getting into trouble with three walks in 4 2/3 innings during another shaky performance by a Mets starter this year.

Pete Alonso and Francisco Lindor each had an RBI groundout, but the Mets have mustered only four runs over the past four games. With a major league-record $355 million payroll, New York (17-17) has lost 10 of 13 since winning eight of nine.

CUBS 4, MARLINS 2 >> Nick Madrigal’s two-run single in the eighth inning lifted the Chicago Cubs to a 4-2 win over the Miami Marlins on Saturday.

Jorge Soler hit a solo homer for the Marlins, who’ve dropped five in a row since sweeping the Cubs last weekend in Miami.

Madrigal’s go-ahead hit off A.J. Puk (3-1) gave the Cubs their first lead. The next batter, pinch-hitter Miguel Amaya, followed with an RBI single of his own. Two of the three runs charged to Puk were unearned thanks to Yuli Gurriel’s inning-opening fielding error.

Reliever Keegan Thompson (2-2) pitched three innings for the win and Adbert Alzolay worked the ninth for his first save of the season.

TIGERS 6, CARDINALS 5 >> The St. Louis Cardinals extended a losing steak to eight for the first time in 16 years, losing to the Detroit Tigers 6-5 on Saturday in Adam Wainwright’s return from the injured list as Akil Baddoo hit a go-ahead double in the 10th inning.

St. Louis is on its longest skid since nine straight losses from Sept. 7-17, 2007. At a National League-worst 10-24, the Cardinals are 14 games under .500 for the first time since ending the 1997 season at 73-89.

A squirrel got one of the day’s biggest ovations when he scampered across the infield in the bottom off the seventh.

Baddoo doubled off Giovanny Gallegos (1-2) to drive in automatic runner Jonathan Schoop.

Wainwright, starting his 19th and what he said will be his final major league season, allowed four runs and eight hits over five-plus innings struck out five and walked none. He had started the season on the injured list with a groin injury.