ST. PETERSBURG, Fla. (AP) -- The way the Toronto Blue Jays have been going lately, they will take a win any way they can get one.
The win was just the fourth in 13 games for Toronto, which had dropped six of seven heading into the final series before the All-Star break.
''We needed that one,'' manager John Gibbons said. ''The way things have been going and then you blow a comfortable lead, (losing) would have been tough.''
Aaron Loup (3-2) pitched 1 1-3 scoreless innings to get the win. Casey Janssen worked a perfect ninth for his 14th save.
Toronto's Mark Buehrle labored five innings in pursuit of his elusive 11th victory, departing with a 5-2 lead that the Blue Jays' bullpen couldn't hold.
Buehrle is 0-5 over seven starts since last winning on June 1. He limited the Rays to Evan Longoria's first-inning sacrifice fly and Ben Zobrist's fourth-inning RBI single despite yielding nine hits, walking one and working through two jams with the bases loaded in his shortest outing of the season.
''I'm frustrated with myself. To go five innings, that's not really called for,'' Buehrle said. ''I'm upset with it. ... I put the bullpen in a tough situation. I need to go deeper into games to give us a chance to win.''
Tampa Bay rallied in the seventh against Dustin McGowan, who walked Longoria and James Loney with two outs before giving up a three-run homer to Sean Rodriguez that made 5-all.
Reyes had a two-run single and Melky Cabrera, Bautista and Munenori Kawasaki also drove in runs for the Blue Jays off starter Chris Archer, who allowed five runs and six hits in five innings.
Bautista added an RBI single in the ninth off Balfour.
''It's a big win, obviously,'' Buehrle said. ''We haven't played well on this road trip and we need to get a few wins to take into the break to feel confident in the second half.''
The loss, meanwhile, was the third in four games for the Rays since returning home from a 9-2 road trip that lifted them out of the AL East cellar. With Friday's setback, they fell back to the bottom the division.
The Rays announced after the game that All-Star David Price (8-7, 3.48 ERA) left the ball park early because he wasn't feeling well and will not make his scheduled start against the Blue Jays on Saturday night. Manager Joe Maddon said there's a possibility he could start Sunday's series finale. That means he wouldn't pitch in the All-Star game.
Balfour faulted himself for letting the game slip away in the ninth.
''The first guy I walked, and you don't want to walk the leadoff guy,'' the reliever said. ''It was embarrassing. It was a bad effort on my part. I didn't throw the ball well, and I felt like when I did make some pretty good pitches, it's good hitting, I guess.''
The Rays loaded the bases in the first and second innings, but only scored once on Longoria's sacrifice fly. Buehrle escaped further damage in the first when Loney grounded into an inning-ending double play, then got through the second without allowing a run when Zobrist flied out.
Archer struck out five of the first six batters he faced before running into trouble in the third when Kawasaki, Cabrera and Bautista drove in runs to give Toronto a 3-1 lead. Reyes singled just beyond the reach of Zobrist in right field to drive in two more runs off Archer in the fourth.
NOTES: Two Blue Jays left with injuries during the game. RF Nolan Reimold strained his left calf running the bases in the fourth, and Kawasaki was removed because of tightness in his right hamstring in the seventh. Tolleson entered the game as his defensive replacement. ... Tampa Bay CF Desmond Jennings was replaced by Kevin Kiermaier after fouling a pitch off his left knee in the second. ... Rays SS Yunel Escobar returned to the lineup after missing 15 games because of a sore right shoulder that put him on the DL. LHP Jake McGee, meanwhile, was placed on the paternity list following the birth of his daughter. ... Toronto put 1B Adam Lind on the 15-day DL with a broken right foot and recalled INF Dan Johnson from Triple-A Buffalo. Johnson, inserted into the lineup as the DH, drew four walks and scored three runs.