TORONTO — With their playoff hopes dashed, the last-place Toronto Blue Jays can look to personal milestones for small victories as they play out the string on the 2017 campaign.

Marcus Stroman earned a career-high 12th win of the season Tuesday by throwing seven strong innings in a 5-2 win over the Kansas City Royals at Rogers Centre. Darwin Barney hit a two-run homer and Russell Martin drove in two runs as the Blue Jays took the opener of the three-game series.

Stroman (12-8), who allowed four hits and one earned run, is primed to reach his goal of the 200-inning plateau by season's end.

"It all started with Stroman," said Blue Jays manager John Gibbons. "He did a hell of a job. Seven strong innings in a tight ball game."

Stroman walked a pair, had five strikeouts, and lowered his earned-run average to 3.01. He has gone seven-plus innings on 11 occasions this season while the rest of the Toronto starters have done it 17 times combined.

"I feel extremely strong," Stroman said. "I feel like I could throw another however many innings. I feel great and I'm looking forward to my next two starts."

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.

"I was looking to get a bunt down," Barney said. "Unfortunately that didn't work out and I guess the best-case scenario after that is what happened.

"I battled a couple pitches and got one I could handle."

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 double scored pinch-runner Rob Refsnyder and Kevin Pillar. Barney added another RBI by driving in Martin with a single.

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.

The ball will be heading to Cooperstown.

"A pretty cool thing to be a part of," Gordon said. "I didn't hit many this year but I guess I made one count. It's good to be in the Hall of Fame, I guess."

Roberto Osuna worked the ninth for his 37th save. Toronto outhit Kansas City 8-6.

Announced attendance was 33,554 and the game took two hours 27 minutes to play.

Notes: Stroman set his previous high for wins during his rookie season in 2014. ... 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.