The Tampa Bay Rays defeated the Milwaukee Brewers 4-3 in 12 innings Tuesday night, scoring twice in the bottom of the 12th to stave off elimination and extend the World Series. The victory at Tropicana Field cut Milwaukee’s series lead to 3-1 after the Brewers had won the first three games.

The Rays appeared headed for another postseason disappointment when Milwaukee shortstop Cooper Pratt launched a solo home run off Tampa Bay reliever Ian Seymour in the top of the 12th inning, putting the Brewers ahead 3-2 and bringing them within three outs of their first World Series championship.

Tampa Bay answered in the bottom half of the inning. A throwing error by Brewers third baseman Joey Ortiz helped put the tying run in scoring position, and Jonny DeLuca delivered an RBI single to bring home Cedric Mullins and even the score at 3-3.

Chandler Simpson followed with a single that loaded the bases, setting up pinch-hitter Ben Williamson. Williamson came through with a ground ball that slipped past first baseman Jake Bauers and into right field, allowing the winning run to score and giving the Rays a 4-3 walk-off victory.

Simpson finished 3-for-5 with an RBI, while DeLuca drove in a run and scored another. Pratt went 4-for-5 for Milwaukee, collecting two RBIs and a home run in a losing effort.

The game remained close throughout regulation. Tampa Bay took a 1-0 lead in the second inning on Simpson’s RBI double. Milwaukee tied the score in the fourth on Pratt’s run-scoring double, but the Rays regained the lead later in the inning when DeLuca’s fielder’s choice brought home Junior Caminero.

Brewers third baseman David Hamilton tied the game again with a solo home run in the fifth. Neither team managed another run through the ninth inning, sending the contest into extra innings before the dramatic 12th-inning finish.

The loss denied Milwaukee an opportunity to complete a World Series sweep and claim the first title in franchise history. The Brewers had dominated Game 3 with a 10-1 victory and entered Tuesday’s matchup needing only one more win.

Tampa Bay became just the fifth team in World Series history to win Game 4 after falling behind 3-0 in the series. The Rays must now win Wednesday night again to force the series back to Milwaukee, while the Brewers will have another opportunity to clinch the championship in Game 5.