In the span of a dizzying nine-game homestand, gloom gave way to exhiliration for the Tampa Bay Rays as their favorite patsies came to town to trigger a surge up the American League East standings.

The Rays stretched their winning streak to five games Sunday, beating Toronto 5-1 behind seven shutout innings from physically challenged Chris Archer and a career-high four RBI by Brandon Guyer, who entered the day with three RBI in his first 15 games this season.

“This game is so weird,’’ said Guyer, who gave Archer a quick 1-0 advantage with a leadoff home run against Mark Buehrle. “Sometimes you hit the ball hard and don’t get a hit. Other times, you don’t hit the ball hard and you get a hit. Hitting is definitely contagious and I think we’ve shown that the whole series.’’

After being swept by the Yankees at Tropicana Field, Tampa Bay lost 1-0 to Boston despite a stellar outing by Archer. But since that April 21 setback, the Rays outscored the Red Sox and Blue Jays by a combined 30-12 margin, adding outstanding defense to their winning formula.

At 11-8, the Rays are three games over .500 for the first time since finishing the 2013 season at 92-71.

Evan Longoria followed Saturday’s 4-for-4 effort with a 3-for-3 day to raise his average to .306 while Tim Beckham (.302) added two hits and a walk. Archer overcame an upset stomach to allow only two hits in seven innings, striking out seven while lowering his ERA to 0.84.

“It was a big series and we knew what we were playing for,’’ Beckham said. “I love being on the same team as Chris Archer — he’s not scared of anyone. He competes, he has fun and he comes right at you.’’