TORONTO -- A strong outing by rookie pitcher Marcus Stroman and three-run homer by pinch-hitter Danny Valencia, his first as a Blue Jay, lifted Toronto to a 5-2 win over the Boston Red Sox on Wednesday night.

Toronto scored four runs -- including two unearned -- in the seventh inning with Valencia's bat leading the way, That made a winner out of Stroman, who was on cruise control other than hitting a two-run bump in the sixth inning.

Jose Bautista also homered for Toronto for the second day in a row as the Jays (67-66) snapped a string of three losses -- and four extra-innings games.

Stroman (8-5) left to an ovation from the Rogers Centre crowd of 30,285 with two outs in the eighth. He gave up one unearned run on five hits, striking out six and walking one. Stroman threw 112 pitches, 73 for strikes.

Left-hander Brett Cecil retired David Ortiz to end the eighth inning and struck out the side in the ninth for his fifth save.

The win was just Toronto's seventh in 23 games in August. The Jays had lost 10 of their last 13 games and 12 of 17.

Boston (58-75) came into the game having won two in a row since snapping an eight-game losing streak.

Red Sox starter Joe Kelly was stingy in his first appearance against the Jays before leaving after facing one batter in the decisive seventh inning. Outside of a home run and single by Bautista, he allowed two walks and a hit batsman in the first six innings.

Kelly, who left his last start Friday with a "minor tweak" in his shoulder, exited in the seventh after giving up a double to Edwin Encarncion. Catcher David Ross then dropped a Dioner Navarro pop foul and the Toronto catcher took advantage, hitting a single to put Jays on first and third.

Boston manager John Farrell pulled left-hander Tommy Layne (0-1) in favour of Junichi Tazawa and Valencia greeted the right hander with a three-run shot to left field.

The Toronto hit parade continued with a Kevin Pillar double and RBI single by Jose Reye, upping the Toronto lead to 5-2.

Stroman has struggled of late, losing his last three decisions. But he was razor-sharp Wednesday, retiring the first eight batters he faced before issuing a walk. He retired 10 of 11 before giving up a walk to Ortiz with one out in the fourth inning with the damage quickly erased by a double play.

The 23-year-old right-hander gave up just one hit and faced 16 batters in the first five innings, just one over the minimum.

Contrast that to his last outing, when he gave up 10 hits and six runs in five innings against Tampa Bay. prior to that he failed to survive the first inning against the White Sox, yielding five runs on five hits.

Stroman's strong showing was timely given that Toronto had used 10 pitchers and a position player on the mound the last two games.

Things went slightly south in the sixth, however, with the Jays leading 1-0. Third baseman's Juan Francisco's throwing error put Ross on with one out and Ortiz singled him home after back-to-back singles by Brock Holt and Dustin Pedroia loaded the bases. Holt then scored from third on a wild pitch to make it 2-1.

Stroman limited the damage, dispatching the next two batters to strand Red Sox on second and third.

Bautista, who snapped an 0-17 slump with a home run Tuesday, went deep again in the first inning with a solo shot to centre field -- his 26th homer of the season. Bautista's shot off the facing of the first outfield deck marked the first time in eight games that Toronto has scored first.

While there were costly errors on both sides, the fans were also treated to some fine fielding.

The first inning featured fine plays by first baseman Mike Napoli and second baseman Pedroia, continuing a Boston trend shown through the series. Reyes showed skills of his own with a fine bare-handed grab of a sharply hit grounder in the second. Second baseman Munenori Kawasaki made a nice backhand grab and throw in the fourth.

Holt, meanwhile, dazzled with a bare-handed stop in the fifth. And it was Boston third baseman Will Middlebrooks's turn to shine in the sixth.

Bautista crashed into the stands down the first-base line trying to chase down a foul ball in the eighth inning but stayed in the game.

Ortiz, given Monday and Tuesday off after being hit by pitches on the elbow and foot on the weekend, returned to his DH role. Ortiz leads all visitors to the Rogers Centre with 37 home runs. he came into the game with 96 RBI here, second to Alex Rodriguez's 97.

A fan left a sign high in the upper deck where Napoli homered Tuesday night. The sign said "Can U Do it Again, Nap."

NOTES:Toronto outfielder Colby Rasmus was sidelined by illness for the second night in a row ... The seven runs conceded in the 11th inning of the Jays' 11-7 loss to the Red Sox on Tuesday was a club record for that inning.