Updated

Brett Lawrie hit a walkoff home run in the ninth inning and the Toronto Blue Jays beat the Texas Rangers 8-7 Tuesday night.

After Francisco Cordero blew a save opportunity in the top of the ninth, Lawrie won it in the bottom half with a leadoff homer against Mike Adams (0-1), a shot that bounced off the top of the wall in left center, his third.

It was the second Toronto homer of the game to bounce off the wall and out: Kelly Johnson's three run shot in the third did the same.

Jose Bautista also connected for Toronto, who rallied from 5-0 down to beat the team with the best record in baseball.

Cordero (1-1) allowed Michael Young's game-tying single in the ninth.

Trailing 6-4 in the seventh inning, Toronto took advantage of some sloppy Texas fielding to score three runs and take the lead.

Leadoff hitter Eric Thames reached on a fielding error by shortstop Elvis Andrus, Lawrie singled and Colby Rasmus was safe when catcher Mike Napoli couldn't make a play on his slow roller in front of the plate, and was charged with an error.

Alexi Ogando called out of the bullpen to replace Robbie Ross and Jeff Mathis greeted him by driving in Thames on a fielder's choice, with Rasmus forced out at second, before Lawrie tied it at 6 by scoring on Yunel Escobar's grounder, with Mathis staying out of the double play by running on the pitch. Johnson followed with a single to center that Craig gentry bobbled, allowing Mathis to score the tiebreaking run.

The rally completed Toronto's comeback from Texas' five-run, bat-around second.

Making his third career start, Blue Jays right-hander Drew Hutchison struck out the first four batters of the game before running into trouble.

David Murphy singled, Mike Napoli walked and Mitch Moreland singled to load the bases for Alberto Gonzalez, who hit an RBI single to right. Another run scored on Gentry's fielder's choice, with Gonzalez forced at second. Gentry stole second before Ian Kinsler lined a two-run double to right. Andrus capped the rally with an RBI single.

Toronto closed the deficit with a pair of homers in the third, going back-to-back for the first time this season. Rasmus and Mathis drew one-out walks and Escobar grounded out before Johnson drilled a three-run shot that bounced off the top of the wall in left center, his fifth. Bautista followed with a towering drive off the facing of the third deck, his fourth homer and first since April 23 at Kansas City.

Both homers came off Rangers starter Neftali Feliz, who allowed four runs and four hits in five-plus innings. He walked a career-high six and struck out four.

Hutchison gave up six runs, five earned, and seven hits in six innings. He walked two and struck out five.

Rangers outfielder Josh Hamilton (back) sat for the second straight game and remains day to day, while third baseman Adrian Beltre was held out of the starting lineup but pinch hit for Gentry in the ninth, striking out.

Home plate umpire Sam Holbrook ejected Blue Jays infielder Omar Vizquel, 45, for arguing balls and strikes from the bench in the top of the fifth.

NOTES: The Blue Jays have blown six saves. ... With Hamilton out, Gentry made his second straight start in CF. Gonzalez replaced Beltre at 3B. ... Canadian-born Hall of Famer Ferguson Jenkins, who pitched for the Rangers for six seasons, attended the game. ... Rangers LH Matt Harrison faces Blue Jays LH Ricky Romero in Wednesday afternoon's finale. Game time is 12:37 EST.