ST. PETERSBURG, Fla. — Nathan Eovaldi pitched six gritty innings, Christian Vazquez hit a three-run homer and the Boston Red Sox beat the playoff-contending Tampa Bay Rays 7-4 Sunday.

Tampa Bay started the day one game up on Cleveland for the second AL wild card. The Rays won the first two games of the series by identical 5-4 scores in 11 innings.

The defending World Series champion Red Sox were eliminated from postseason play Friday night.

Boston designated hitter J.D. Martinez drove in two runs and is one RBI away from his third consecutive and fourth overall season of at least 35 homers and 100 RBIs.

Rays two-way player Brendan McKay got his first major league homer on a solo shot off Trevor Kelley as a pinch-hitter in the ninth.

Martinez had an RBI single and Vazquez hit his homer off Ryan Yarbrough (11-5) as Boston went up 4-0 in the first.

Vazquez has 22 homers in 133 games this year. He went deep 10 times over 291 games during his first four seasons.

Eovaldi (2-0) gave up three runs and seven hits in picking up his first win as a starter since last Sept. 24. The right-hander had elbow surgery to remove a loose body in late April and has been building up innings over the last month.

The Rays scored a run in each of the first three innings off Eovaldi, including Joey Wendle's third-inning homer, to get within 4-3.

Boston took a 6-3 lead in the fourth when Andrew Kittredge replaced Yarbrough with one-out and walked Martinez with the base loaded and later threw a wild pitch.

Yarbrough allowed six runs and eight hits in 3 1/3 innings.

Tampa Bay All-Star second baseman Brandon Lowe, out since July 3 with a bruised right shin and later strained left quadriceps, was reinstated from the 60-day injured list and went 1 for 3 with a walk.

PREPARING FOR 2020

Red Sox manager Alex Cora plans to have a busy offseason working with his players in a number of areas like on-base percentage and cutting down on strikeouts. "We have to keep adjusting," Cora said. "Be better at certain aspects and we'll be back."

TRAINER'S ROOM

Red Sox: LHP David Price will have surgery Thursday to remove a cyst in his left wrist but is expected to be ready for spring training next year. ... OF Mookie Betts, who played the previous two days after missing a week due to left foot inflammation, had a scheduled day off. ... OF Andrew Benintendi (jammed left thumb) was out of the lineup for the second straight game but could start Monday.

Rays: OF Avisail Garcia, who left Friday's game with vertigo-type symptoms, is now experiencing just slight discomfort.

UP NEXT

Rays LHP Blake Snell (6-7) will make his second start Monday night since surgery July 29 to remove bone chips in his throwing elbow against Boston RHP Jhoulys Chacin (3-11).