Kevin Pillar hit a two-run homer with two outs in the eighth inning to lift the Toronto Blue Jays over the Kansas City Royals 6-5 on Tuesday night.

Blaine Boyer (2-1) retired his first two batters before walking Aledmys Diaz and backing Pillar into an 0-2 count. Pillar hit the next pitch over the wall down the left field line.

More Images
Kansas City Royals' Salvador Perez celebrates in the dugout after scoring on a double by Jorge Bonifacio during the seventh inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Kevin Pillar hit a two-run homer with two outs in the eighth inning to lift the Toronto Blue Jays over the Kansas City Royals 6-5 on Tuesday night.

Toronto Blue Jays second baseman Devon Travis throws to first for the double play hit into by Kansas City Royals' Brett Phillips after forcing Rosell Herrera (7) out a second to end the fifth inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Salvador Perez and Jorge Bonifacio hit back-to-back doubles in the seventh off Jake Petricka (2-1) to give the Royals a short-lived 5-4 lead.

Toronto Blue Jays' Russell Martin is hit by a pitch thrown by Kansas City Royals starting pitcher Heath Fillmyer with the bases loaded scoring a run during the third inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Heath Fillmyer walked two more Jays in the third and hit Russell Martin with a pitch with the bases loaded for the third run.

Toronto Blue Jays starting pitcher Ryan Borucki throws during the first inning of a baseball game against the Kansas City Royals Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

The Royals quickly tied it with Mondesi's two-out single scoring Alcides Escobar, who had doubled.

Kansas City Royals starting pitcher Heath Fillmyer throws during the first inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

The Royals have lost 10 of 12.

Ken Giles worked a perfect ninth for his 14th save and second with the Blue Jays since being acquired from Houston on July 30.

Kansas City Royals' Salvador Perez celebrates in the dugout after scoring on a double by Jorge Bonifacio during the seventh inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Kansas City Royals' Salvador Perez celebrates in the dugout after scoring on a double by Jorge Bonifacio during the seventh inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Salvador Perez and Jorge Bonifacio hit back-to-back doubles in the seventh off Jake Petricka (2-1) to give the Royals a short-lived 5-4 lead.

Adalberto Mondesi had a career-high four hits, including two doubles, stole three bases, drove in a run and scored a run for Kansas City.

The Blue Jays, who had scored four runs in their previous four games total, jumped to a 3-0 advantage. Teoscar Hernandez and Kendrys Morales walked to lead off the second and both scored. Pillar contributed a two-out RBI single, while the other run scored when Diaz grounded into a double play.

Toronto Blue Jays second baseman Devon Travis throws to first for the double play hit into by Kansas City Royals' Brett Phillips after forcing Rosell Herrera (7) out a second to end the fifth inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Toronto Blue Jays second baseman Devon Travis throws to first for the double play hit into by Kansas City Royals' Brett Phillips after forcing Rosell Herrera (7) out a second to end the fifth inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Heath Fillmyer walked two more Jays in the third and hit Russell Martin with a pitch with the bases loaded for the third run.

The Royals answered with three runs in third, which included Perez's run-producing double and Whit Merrifield and Alex Gordon adding RBI singles.

Danny Jansen put the Blue Jays ahead 4-3 in the fourth with his first big league home run in his second game.

Toronto Blue Jays' Russell Martin is hit by a pitch thrown by Kansas City Royals starting pitcher Heath Fillmyer with the bases loaded scoring a run during the third inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Toronto Blue Jays' Russell Martin is hit by a pitch thrown by Kansas City Royals starting pitcher Heath Fillmyer with the bases loaded scoring a run during the third inning of a baseball game Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

The Royals quickly tied it with Mondesi's two-out single scoring Alcides Escobar, who had doubled.

Fillmyer left after five innings and 93 pitches, allowing four runs, five hits and five walks.

Blue Jays starter Ryan Borucki was pulled after four innings, yielding four runs, six hits and four walks.

Toronto Blue Jays starting pitcher Ryan Borucki throws during the first inning of a baseball game against the Kansas City Royals Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Toronto Blue Jays starting pitcher Ryan Borucki throws during the first inning of a baseball game against the Kansas City Royals Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

The Royals have lost 10 of 12.

Rain delayed the start of the game 31 minutes.

DOUBLES FOR ESCOBAR

Escobar's sixth-inning double was the 200th of his career. He is the 11th Royal to reach that milestone.

JAYS ACQUIRE BAKER

Kansas City Royals starting pitcher Heath Fillmyer throws during the first inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

Kansas City Royals starting pitcher Heath Fillmyer throws during the first inning of a baseball game against the Toronto Blue Jays Tuesday, Aug. 14, 2018, in Kansas City, Mo. (AP PhotoCharlie Riedel)

The Blue Jays acquired minor league RHP Bryan Baker from the Rockies as the player to be named in a July 26 trade that sent RHP Seunghawan Oh to Colorado. Baker posted a 3.80 ERA in 43 relief appearances with Class A Lancaster.

TRAINER'S ROOM

Blue Jays: Boyer was making his first appearance since April 29 and missing 61 games with a back strain. ... RHP Aaron Sanchez (bruised right index finger) will make a rehab start Wednesday for Class A Dunedin in the Florida State League.

UP NEXT

Blue Jays: RHP Marco Estrada (5-9, 4.84 ERA) will start the third game of the series.

Royals: RHP Burch Smith (1-4, 6.97) will make his seventh start after beginning the season in the bullpen.

More AP baseball: https://apnews.com/tag/MLBbaseball and https://twitter.com/AP_Sports