TORONTO -- Russell Martin hit an RBI double to tie the game in the ninth inning and Devon Travis drove him in to give the Toronto Blue Jays a wild 10-9 walkoff win over the Boston Red Sox on Saturday.

Travis hit a sharp grounder inside the third-base line but Travis Shaw was low with the throw to first, allowing Martin to score. The Blue Jays extended their winning streak to four games with the victory.

Justin Smoak started the two-out rally with a single off Red Sox closer Craig Kimbrel. He stole second base and moved to third on an errant throw before Martin cashed him in with a drive to the gap in left-centre field.

Boston slugger David Ortiz had put the Red Sox ahead with a solo homer in the top of the ninth. That silenced the sellout crowd of 48,154 at Rogers Centre that was riding high after the Blue Jays tied the game with a four-run eighth inning.

Xander Bogaerts and Travis Shaw also went deep for the Red Sox, who scored four runs in the fifth inning and tacked on two more in the sixth against Blue Jays starter Marcus Stroman.

Hanley Ramirez drove in three runs for the Red Sox (29-20). Kimbrel (0-2) shouldered the loss and Gavin Floyd (2-3) picked up the win.

Martin also homered for Toronto, which climbed back over the .500 mark with the victory.

The Blue Jays (26-25) opened the scoring in the third inning after back-to-back doubles. Darwin Barney, filling in for the injured Troy Tulowitzki at shortstop, sent a Rick Porcello pitch down the right-field line and Kevin Pillar drove him in with a hit in virtually the same spot.

Jose Bautista moved Pillar to third base with a bloop single and Josh Donaldson walked to load the bases with nobody out. Edwin Encarnacion was hit by a pitch to make it a two-run game and Michael Saunders hit into a double-play to cash in a third run.

Bogaerts extended his hitting streak to 21 games in the fourth inning with a solo shot that bounced off the top of the wall in left-centre field. It was his sixth home run of the season.

Ortiz followed with a double and Stroman issued a four-pitch walk to Ramirez.

Sparkling defence by Barney prevented a big inning. He snared a liner from Jackie Bradley Jr., and doubled off Ortiz with a nice backhand flip to Travis at second base.

Christian Vazquez got Boston's fifth-inning rally started with a one-out double. Mookie Betts moved him to third with an infield single and Dustin Pedroia drove them in with a double.

Bogaerts singled to set the stage for Ortiz, who swung at a third strike despite being hit by the pitch in the left shin. Ramirez drove a ball to left field that scored two more runs before he was thrown out at second base on a nice throw by Saunders.

Bradley Jr., led off the sixth inning with a double and scored on Shaw's seventh home run of the season.

Stroman was pulled with one out in the frame. He gave up seven earned runs, 11 hits and a walk while striking out five.

Martin hit his third homer of the year in the sixth inning but Boston restored its four-run cushion in the seventh when Ramirez drove in Bogaerts with an RBI single.

Porcello worked 6 2/3 innings, allowing four earned runs, seven hits and a walk. He had five strikeouts.

Saunders and Smoak reached against reliever Tommy Layne in the eighth inning. Junichi Tazawa came on and Martin hit a flare that scored Saunders from second base.

Travis followed with a double that scored Smoak and a wild pitch to pinch-hitter Jimmy Paredes allowed Martin to score. Tazawa struck out Paredes and was replaced by Kimbrel, who struck out Pillar before up a game-tying RBI single to Bautista.

Notes: Ortiz has 13 homers on the season. ... It was Toronto's eighth home sellout of the season. ... Before the game, the Blue Jays placed Tulowitzki on the 15-day disabled list due to a quadriceps strain and activated pitcher Aaron Loup. The left-handed reliever suffered a forearm flexor strain during spring training. Loup came on in the seventh inning and struck out both batters he faced. ... Montreal Canadiens defenceman P.K. Subban, wearing a No. 76 jersey with "Subbanator" on the back, took a few swings in the batting cage before the game. ... Home plate umpire Mike DiMuro left the game in the second inning after he was struck in the face mask by a foul ball. Crew chief Brian Gorman moved behind the plate from second base. ... Knuckleballer R.A. Dickey (2-6, 4.60 earned-run average) will start Sunday's series finale against former Blue Jays ace David Price (7-1, 5.34).