TORONTO -- For the second straight day at Rogers Centre, there was a game-ending play at home plate. But this time, the Tampa Bay Rays were celebrating.

Matt Joyce hit a home run and drove in three runs Saturday as the Rays held off the Toronto Blue Jays for a 5-4 victory.

With two out in the bottom of the ninth, Omar Vizquel tried to score from second on Colby Rasums' single to centre. But centre-fielder B.J. Upton threw home to catcher Jose Molina, who blocked the plate for the out.

On Friday, the Blue Jays won 2-1 with the last out made on a play at the plate.

Edwin Encarnacion hit a two-run homer for the Blue Jays in the fourth, his 36th of the season.

Adam Lind hit a two-run single in the eighth to cut the Rays' lead to one run, but Fernando Rodney worked out of the eighth and finished the game to earn his 40th save.

It was the first win in the four-game series by the struggling Rays, who dropped the first two games and will try to gain a split in Sunday's finale.

The Rays entered the game third in the American League East, 4 1/2 games behind the first-place New York Yankees. The Blue Jays are fifth.

The loss ended a three-game winning string by the Blue Jays (60-72) while the Rays (72-61) were won for only the second time in eight games.

The Rays scored four runs on five hits and four walks over five innings against right-hander Henderson Alvarez (7-12), who remains winless since July 28 and has lost five of his past six starts.

Rays' right-hander Jeff Niemann left the game with tightness in his right arm after 3 1/3 innings in which he allowed one hit while striking out four. The win went to reliever Wade Davis (2-0).

Niemann, 29, was making his first start since May 14 when he suffered a fractured right fibula when struck by a line drive off the bat of Lind at Rogers Centre.

The Rays who were held to one run in the first two games of the series, took the lead in the third inning.

Ryan Roberts, a former Blue Jay, had the first hit of the game when he hit his third homer since joining the Rays on July 25.

Jose Lobaton walked and Desmond Jennings singled. B.J. Upton forced Jennings at second with a grounder to shortstop as Lobaton took third. Ben Zobrist doubled to score one run. Evan Longoria walked and Joyce doubled in two runs.

Niemann left the game with one out in the fourth and was replaced by left-hander J.P. Howell. Rasmus walked and Encarnacion hit a mammoth homer to left centre. They were the first runs allowed by Howell in 27 1/3 innings, a Rays' club record.

The Blue Jays had runners at first and second with two out in the fifth when Rajai Davis walked and stole second and Rasmus followed with a walk. But with Encarnacion at the plate, Rasmus was thrown out at second on the back end of an attempted a double steal to end the inning.

The Rays extended their lead when Joyce hit his 15th homer of the season with one out in the eighth against Brad Lincoln.

Adeiny Hechavarria led off the eighth with a double against Joel Peralta and Davis followed with a single. Rasmus struck out to extend his hitless drought to 0-for-14.

Encarnacion walked to load the bases. Lind singled in two runs. Rodney replaced Peralta and walked Yorvit Torrealba to load the bases again. But Kelly Johnson and Moises Sierra struck out.

Rodney walked Vizquel to lead off the ninth and Hechavarria bunted him to second. Rasmus singled to centre with two out and Vizquel was thrown out at home.