TORONTO — Nothing like a historic homer and a blowout victory to ease the frustration of a long road trip.

Third baseman Mike Moustakas clubbed his 37th homer of the season, breaking Steve Balboni’s franchise record, and rookie starter Jakob Junis yielded two earned runs in 6.1 innings as the Royals clobbered the Blue Jays 15-5 on Wednesday night at Rogers Centre.

The performance ended a three-game losing streak, and the Royals moved to 74-77, 3.5 games back of the Minnesota Twins in the race for the second American League wild-card spot. Kansas City evened the series at a game apiece entering the finale tonight.

After absorbing five losses in six games, the Royals were in need of relief. It came Wednesday in the form of Blue Jays starter Brett Anderson and the rest of the Toronto pitching staff.

The offense exploded for eight runs in the top of the second inning, chasing Anderson. The historic portion of the night came in the top of the sixth, when Moustakas drilled a solo homer against Toronto reliever Carlos Ramirez in a four-run inning.

Balboni’s franchise record of 36 homers in one season, set in 1985, had survived for 32 years. Moustakas ended a 15-game drought without a home run.

Salvador Perez added his 26th homer of the season on a two-run shot that stretched the lead to 9-0 in the second. Whit Merrifield roped his 18th of the year on a solo blast against Ramirez in the top of the sixth.

Merrifield, who also stole two bases to momentarily take the American League lead with 32 on the season, needs just two homers in the Royals’ last 11 games to become the third player in franchise history with 20 homers and 30 steals in one season. The other two are Carlos Beltran and Amos Otis.

Junis, meanwhile, took a no-hitter into the fifth inning before allowing an infield single to Kevin Pillar. Moustakas had an opportunity to make the play, but he bounced the throw and Eric Hosmer could not come up with the pick. By the end, Junis had continued his strong rookie season, lowering his ERA to 4.05 while improving to 8-2.