TORONTO -- Jose Bautista singled to right field with the bases loaded and no outs in the 19th inning, leading Toronto to a 6-5 win over the Detroit Tigers on Sunday in the longest game in Blue Jays history.

Tigers right-hander Rick Porcello (13-7), usually a starter, entered the game in the 17th and took the loss as the Blue Jays took the rubber match of the three-game series.

Porcello allowed a leadoff single in the 19th to Munenori Kawasaki. Jose Reyes bunted and reached first on Porcello's error while Kawasaki reached third. Left fielder Melky Cabrera was walked to load the base to bring up Bautista.

It was the Blue Jays' longest game in time at six hours, 37 minutes, and the first time they played past 18 innings.

Right-hander Chad Jenkins (1-1) allowed seven hits over six innings to earn the win.