TORONTO -- Darwin Barney hit a two-run homer and Marcus Stroman turned in a strong seven-inning performance as the Toronto Blue Jays defeated the Kansas City Royals 5-2 on Tuesday night.

Ryan Goins led off the sixth inning with a single before Barney turned on an 0-2 pitch from Ian Kennedy for his fifth homer of the year.

Russell Martin drove in a pair of runs and scored in Toronto's three-run seventh inning to help the Blue Jays (71-80) take the opener of the three-game series. Roberto Osuna worked the ninth for his 37th save.

Stroman (12-8) set a career high for victories in a season. He allowed four hits, one earned run and two walks while striking out five.

Royals starter Ian Kennedy (4-12) allowed just one hit -- a Justin Smoak double -- over the first five innings.

Goins squeaked a ball through the infield in the sixth and the Barney blast ended the right-hander's night. Kennedy allowed three hits, two earned runs and struck out a pair.

Stroman, meanwhile, gave up a single to Whit Merrifield in the first inning and a double to Mike Moustakas in the second before finding his groove.

The Royals (73-77) got on the board in the seventh inning after Eric Hosmer and Salvador Perez hit back-to-back singles to put runners on the corners with nobody out. Centre-fielder Kevin Pillar made a nice sliding catch on a Mike Moustakas liner but it was enough to bring Hosmer home on the sacrifice fly.

Toronto answered in the bottom half as Martin's gapper scored pinch-runner Rob Refsnyder and Kevin Pillar. Barney drove in his third run of the night with a single that scored Martin.

Alex Gordon hit a solo shot off Toronto reliever Ryan Tepera in the eighth inning. His eighth homer of the season came on a 3-2 pitch.

Gordon's homer set a new MLB record. It was the 5,694th home run of 2017, breaking the season record set in 2000 at the height of the Steroids Era.

Toronto outhit Kansas City 8-6. Announced attendance was 33,554 and the game took two hours 27 minutes to play.

Notes: Left-hander Brett Anderson (3-3, 5.73 earned-run average) was scheduled to start for the Blue Jays on Wednesday night against right-hander Jakob Junis (7-2, 4.15) ... The Blue Jays will close out their home schedule this weekend with a three-game set against the New York Yankees. ... The Royals are in the middle of an 11-game road trip that began last week in Cleveland and includes stops in Chicago and New York. ... Toronto has won seven of its last 10 games but is 12-18 over its last 30. ... The Blue Jays improved to 40-36 at home this season.