Austin Meadows hit a three-run homer and later scored the go-ahead run on Manuel Margot's pinch-hit single in the seventh inning as the Tampa Bay Rays beat the Houston Astros 5-4 Sunday.

The Rays avoided a three-game sweep in the series between the last two American League champions.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Meadows homered in the fifth to make it 3-all. With the score tied at 4 in the seventh, Meadows was hit by a pitch from Brooks Raley (0-1) and later scored when Margot punched a hit through the right side.

Jeffrey Springs (2-0) got the win in relief. Diego Castillo pitched the ninth for his seventh save in nine tries.

Yordan Alvarez hit his third home run for the Astros in the fourth inning. He doubled and scored in the sixth, and barely missed hitting another homer in the eighth when Margot ran down his line drive in the left-field corner.

Kevin Kiermaier had three of Tampa Bay's seven hits.

Meadows homered after Astros starter Christian Javier walked Soshi Tsutsugo and hit Randy Arozarena with a pitch. Meadows' fifth homer was the Rays' first hit in four games with a runner in scoring position.

The Astros regained a 4-3 lead in the fifth on Myles Straw's two-out single.

Kiermaier doubled in the sixth and scored the tying run when catcher Martin Maldonado couldn't handle a high throw from first baseman Yuri Gurriel on Willy Adames' groundball.

Rays starter Rich Hill pitched to 11 batters, giving up one hit and one walk in three innings.

CLICK HERE TO GET THE FOX NEWS APP

TRAINER'S ROOM

Rays: 1B Ji-Man Choi (arthroscopic knee surgery) will play at least a week for Triple-A Durham on a rehab assignment before being activated. . . . . RHP Pete Fairbanks (right rotator cuff strain) will travel with the team on its seven-game California road trip.

UP NEXT

Astros: Zack Greinke will start Tuesday night in the first game of a three-game series against the Yankees in New York.

Rays: Tyler Glasnow will face Shohei Ohtani on Monday night in the first game of a four-game series against the Los Angeles Angels in Anaheim.