Updated

TORONTO (AP) — After a ninth inning call that went against them led to manager Joe Maddon getting tossed, things started going right for the Tampa Bay Rays.

Sean Rodriguez hit a go-ahead, three-run double in a wild ninth that featured two ejections and the Rays rallied to beat Toronto 7-6 on Tuesday night.

"It was a big win," Maddon said. "I normally don't speak of big wins but that one is."

The Blue Jays led 5-3 to begin the inning, but Carl Crawford drew a one-out walk and stole second. He was nearly picked off, but ended up at third after Gregg's throwing error sent the ball into center field.

Evan Longoria walked to put runners on the corners for Carlos Pena, who struck out looking after he was denied a timeout call by home plate umpire Angel Hernandez.

"He's a good umpire," Pena said. "I jut thought he made a bad decision there."

Pena said he sensed Gregg speeding up his delivery when he realized what was happening.

"I was just hoping he was going to throw a ball," said Pena, who threw his bat at he pitch but failed to make contact.

Maddon came out to argue and was ejected by Hernandez, his second ejection of the season. Maddon, who said he wanted to "make a stand," also argued with crew chief Joe West at third base, then jawed with Hernandez again before leaving the field.

"I'm all for supporting league policy but when it comes to speed-up rules in those situations I think they can basically be thrown in the trash can," Maddon said. "It's inappropriate. There's no such thing as a speed-up rule at that moment in the game, and that was my argument."

Inappropriate was the same sentiment expressed by Gregg to describe his career high five-walk, 40-pitch, 26-ball performance.

"Walking that many guys in an inning is not going to work," a frustrated Gregg said. "It's not appropriate."

With Maddon gone and the Rays down to their final out, their luck changed. Gregg (0-2) loaded the bases by walking pinch-hitter John Jaso, then made it 5-4 by walking Ben Zobrist. Rodriguez followed with a double to center that Vernon Wells bobbled, allowing all three runners to score.

"The opportune moment can be disguised, or be wearing different clothing," Maddon said of the sudden turnaround. "Right there it was wearing the clothing of not permitting a timeout."

It's the second time this season the Rays have won when trailing after eight; they also did it in a 4-3 win over Baltimore on Opening Day.

"Sometimes weird stuff does spark the good," Pena said.

Rodriguez, who came in batting .224, said his lightweight average may have caused Gregg to underestimate him.

"He had been all over the place a little bit but he hadn't been missing much," Rodriguez said. "I figured with me coming up there he was going to be a little bit more relaxed, you know, thinking 'This guy's not hitting very well,' so I figured I'd probably get more pitches to hit."

On a 1-1 cutter, Rodriguez lined the ball over the head of second baseman Aaron Hill.

"What a great at-bat and what a clutch hit in that situation," Pena said.

The blown save was Gregg's third.

"When you have a lead that late in the ball game, you've got to shut it down, you've got to beat them," Blue Jays manager Cito Gaston said.

Gaston replaced Gregg with left-hander Rommie Lewis after Dioner Navarro walked. Gregg was ejected by Hernandez for arguing as he walked off the mound and had to be restrained by bench coach Nick Leyva.

"Technically, I'm probably not supposed to comment on the strike zone," Gregg said. "Obviously, you can watch the game and see how things dictate it. All we ask is that it's consistent throughout the game and consistent in the ninth inning."

Grant Balfour (1-1) pitched 1 1-3 innings for the win. Rays closer Rafael Soriano gave up Wells' RBI double in the ninth but got Jose Bautista to end it with a fly to left, giving him his 15th save in as many chances.

Fred Lewis gave the Blue Jays an early lead when he led off the bottom of the first with a homer to right, his fourth.

Toronto made it 4-0 in the fifth when John Buck hit a solo homer to center, his ninth, and Adam Lind followed back-to-back singles by Lewis and Aaron Hill with a two-out, two-run triple to right.

Buck's sacrifice fly made it 5-0 in the sixth, but the Rays closed the gap with a three-run seventh.

Tampa Bay right-hander Jeff Niemann allowed a season-high five runs and nine hits in 6 1-3 innings. He walked one and struck out four.

After being out since April 17 with a strained left forearm, Toronto's Brian Tallet came off the disabled list to pitch 5 2-3 shutout innings, allowing four hits. He walked three and struck out four.

NOTES: Gregg's ejection was Toronto's first of the season. ... The Blue Jays lead the majors with 91 homers. ... Lewis has an AL-leading 19 doubles in 40 games since joining Toronto in an April 15 trade from San Francisco. ... The Blue Jays traded LHP Dana Eveland to Pittsburgh for Double-A RHP Ronald Uviedo. Eveland had been designated for assignment last week.