TORONTO -- Even with a seven-run lead, Joe Maddon never got too comfortable when the power-packed Toronto Blue Jays came up to bat.
"They're the SWAT team of the American League," the Tampa Bay Rays manager said. "They can strike at any moment."
Toronto rallied from a seven-run deficit to tie the game 8-all, but Rays third baseman Evan Longoria scored the go-ahead run on a throwing error by shortstop Yunel Escobar in the ninth inning as the Rays beat the Blue Jays 9-8 Friday night.
"At this time of the year, if you score one more point than the other team, you'll take it any day of the week," Maddon said.
The AL wild-card leaders, Tampa Bay entered 2 1/2 games behind the New York Yankees in the East.
Tampa Bay led 8-1 in the fourth before the Blue Jays rallied. Jose Bautista's second homer of the game, a two-run shot in the seventh, tied it at 8.
"They're a good ballclub," Upton said of the Blue Jays. "In any other division, they're at the top. You can't take anything for granted with these guys."
The Rays won it with an unearned run in the ninth against Toronto closer Kevin Gregg (1-5). After back-to-back walks to Longoria and Carlos Pena, Sean Rodriguez hit a grounder to first. Lyle Overbay forced Pena at second but Escobar's return throw sailed wide, allowing Longoria to score.
"As soon as I hit it I just said 'Beat Kevin Gregg to the bag,'" Rodriguez said. "That was my only thought."
Rodriguez said a hard slide by Pena may have disrupted Escobar's relay attempt.
"He did a good job, he got after Escobar," Rodriguez said of Pena. "That's one of those hustle plays to win the game that might go overlooked."
"Soriano was magnificent," Maddon said.
Soriano has converted 19 consecutive save opportunities, matching Roberto Hernandez's club record, set in 1999.
Bautista hit his major league-leading 45th and 46th home runs but Toronto still lost its third straight. It was Bautista's seventh multihomer game of the season and the ninth of his career.
The 222 homers is the second most in Blue Jays history, surpassing the 221 by the 1998 team. Toronto hit 244 homers in 2000.
The Rays scored six runs in a bat-around first against Toronto left-hander Brett Cecil, who came in 8-2 with a 2.36 ERA in 11 starts against AL East opponents.
Upton led off with a single but was erased on Jason Bartlett's fielder's choice. Carl Crawford hit an RBI triple and Longoria singled him home before Pena struck out. Rodriguez walked and both he and Longoria scored on Rocco Baldelli's double before Zobrist homered to left, his 10th.
The Blue Jays got one back in the bottom half when Escobar scored on a base hit by Vernon Wells.
The Rays responded with a run in the second. Bartlett doubled, took third on Crawford's infield single and scored on Longoria's single.
Cecil left after issuing a leadoff walk to Baldelli in the third, matching his shortest start of the season. He allowed seven runs and eight hits, walked two and struck out three.
"He's been tough on us in the past because he's been able to locate his pitches and pretty much do what he wants," Upton said. "I didn't really see that from him today."
Upton hit a leadoff homer off reliever Josh Roenicke in the third, his 17th.
Lind hit a two-run drive in the fourth, his 21st, and Bautista added a two-run drive in the fifth, both off Rays right-hander James Shields.
Shields was tagged for six home runs in his previous start against Toronto on Aug. 7 and came in 1/3 with a 5.67 ERA in five career starts at Rogers Centre. The right-hander allowed five runs, four earned, in five innings.
"This team definitely gives him a tough time," Maddon said.
Buck matched his career high by connecting off Choate to begin the seventh, his 18th.
Bautista took exception to a called first strike after being denied time by plate umpire Chad Fairchild. He stepped out of the box to complain, then swatted Benoit's next pitch over the wall in left-center for a tying home run.
"I just wanted a reason why he didn't give me time after I requested it," Bautista said. "I'm just glad I kept my cool and was able to focus and put a good swing on the next pitch."
The crowd of 14,305 called Bautista out of the dugout for a curtain call after he circled the bases. He has gone deep 30 times at home this season, matching Carlos Delgado's club record, set in 2000.
The Blue Jays recalled LHP Brad Mills from Triple-A Las Vegas. RHP Taylor Buchholz, claimed on waivers from Colorado on Thursday, also joined the team. ... Tampa Bay sent minor league RHP Matt Gorgen to Arizona to complete the July 31 trade for Qualls.