Nate Lowe hit a two-run homer in the 11th inning, and the Tampa Bay Rays beat the Boston Red Sox 5-4 on Saturday night to move one game ahead of Cleveland for the second AL wild card.

Tampa Bay won its third straight game, all in 11 innings.

A day after the defending World Series champion Red Sox were mathematically eliminated, Mitch Moreland put Boston ahead 4-3 with a two-out homer in the 11th off Diego Castillo (5-8).

Tampa Bay Rays' Nate Lowe gets doused after his two-run, walk-off home run against Boston Red Sox relief pitcher Josh Smith in the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. Tampa Bay won 5-4. (AP PhotoChris O'Meara)

Tampa Bay Rays' Nate Lowe gets doused after his two-run, walk-off home run against Boston Red Sox relief pitcher Josh Smith in the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. Tampa Bay won 5-4. (AP PhotoChris O'Meara)

Travis d'Arnaud doubled off Josh Smith (0-3) in the bottom half, and Lowe sent an opposite-field drive down the left-field line.

Xander Bogaerts and Rafael Devers also homered for the Red Sox.

Boston's J.D. Martinez 0 for 5 with four strikeouts as a designated hitter after missing three games with left groin tightness.

Tampa Bay Rays' Nate Lowe, center, celebrates after his walk-off, two-run home run off Boston Red Sox relief pitcher Josh Smith during the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

Tampa Bay Rays' Nate Lowe, center, celebrates after his walk-off, two-run home run off Boston Red Sox relief pitcher Josh Smith during the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

D'Arnaud and Joey Wendle had run-scoring singles as the Rays took a 2-0 lead in the third, and Willy Adames put the Rays ahead 3-1 with a long homer off Josh Taylor in the seventh.

Devers hit a two-run homer off Nick Anderson that tied it 3-3 in the eighth.

Rays starter Yonny Chirinos, reinstated from the 10-day injured list after being sidelined since Aug. 5 by right middle finger inflammation, entered in the fourth and allowed Bogaerts' leadoff homer.

Boston Red Sox's Mitch Moreland watches his solo home run off Tampa Bay Rays relief pitcher Diego Castillo during the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

Boston Red Sox's Mitch Moreland watches his solo home run off Tampa Bay Rays relief pitcher Diego Castillo during the 11th inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

Bogaerts has a career-high 32 homers and 110 RBIs. He got his 51st double during the first.

Tyler Glasnow made his third start for the Rays after missing four months with a strained right forearm. He struck out seven in three scoreless innings.

BUSY BULLPENS

Tampa Bay Rays' Willy Adames celebrates his solo home run off Boston Red Sox relief pitcher Josh Taylor during the seventh inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

Tampa Bay Rays' Willy Adames celebrates his solo home run off Boston Red Sox relief pitcher Josh Taylor during the seventh inning of a baseball game, Saturday, Sept. 21, 2019, in St. Petersburg, Fla. (AP PhotoChris O'Meara)

Boston used 11 pitchers on a bullpen day. With Glasnow on a pitch count of around 50, the Rays used nine pitchers.

FULL CLUBHOUSE

With the addition of Chirinos, the Rays now have a team record 39 active players. This is the last season that a team can expand to any number from the 40-man roster in September. Next year teams will carry 28 players during the month.

TRAINER'S ROOM

Red Sox: LF Andrew Benintendi (jammed left thumb) pinch ran in the ninth. ... RHP Heath Hembree, out since Aug. 2 with right elbow inflammation, will likely be opener in a game during the season's final week.

Rays: All-Star 2B Brandon Lowe (bruised right shin and strained left quadriceps) played four innings in an instructional league game. ... OF Avisail Garcia, who left after six innings Friday with dizziness, felt better but didn't play.

UP NEXT

Rays LHP Ryan Yarbrough (11-4) will face Red Sox RHP Nathan Eovaldi (1-0) Sunday.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports