DETROIT -- It took 864 major league games for Jordy Mercer to hit his first game-ending homer.
As he rounded the bases Thursday, one thought went through his mind.
"All I was really thinking was how cold the Gatorade bath was going to be," he said. "I couldn't wait to get to the plate, but they really got me."
The 32-year-old Tigers shortstop didn't mind, since his two-run homer in the bottom of the ninth gave Detroit a 10-8 victory over the Kansas City Royals.
"That's an awesome feeling, especially since I had never hit one," he said. "I have a lot of game-ending hits, but you always dream about hitting a walk-off homer. This isn't the year we hoped for, but there are still good moments."
The teams combined for eight homers on a rare night where the ball was flying at Comerica Park.
"We don't get a lot of games like that here," Tigers manager Ron Gardenhire said. "It seemed like everything was going out."
Mercer then hit a 2-1 fastball from Richard Lovelady (0-2) into the right-field stands for his sixth homer of the season.
"I wanted a fastball down and away and it stayed up," Lovelady said. "Every time I tried to throw a fastball away, I couldn't get it below the belt."
The homer was Detroit's fourth on a night in which both starters struggled.
Joe Jimenez (3-6) got the win with a scoreless ninth inning.
Tigers starter Matt Boyd gave up five runs on six hits, including three homers, and three walks in a season-worst 2 2/3 innings. Boyd entered the game fourth in the American League with 187 strikeouts, but only had one against the Royals.
"I knew right away I was out of sync, and that's going to happen once in a while," he said. "Usually, I can make an adjustment and get things back under control, but nothing worked tonight."
Hector Lopez, making his first start since May 25, only got four outs. He allowed five runs on two hits, three walks and a hit batter.
Against a Tigers team with the American League's worst on-base percentage, Kansas City pitchers walked nine batters.
"Walks early, walks in the middle and walks late," Royals manager Ned Yost said. "That's not good for business. We'd been better lately at containing them, but we just couldn't do it tonight."
Detroit, though, scored five runs on two hits in the second.
After a single and an error, Harold Castro's three-run homer gave the Tigers the lead.
Lopez walked the next two hitters and, after a groundout, hit JaCoby Jones to load the bases. He then walked Niko Goodrum on four pitches to force in Detroit's fourth run of the inning before being replaced by Kevin McCarthy.
McCarthy walked Miguel Cabrera to make it 5-2 before getting out of the inning.
Kyle Zimmer replaced McCarthy to start the third and walked the first three batters he faced. Mercer struck out, but Victor Reyes bounced into a run-scoring force at second to give the Tigers a 6-5 lead.
Cabrera led off the fourth with his 473rd career homer to make it 7-5, but Gordon hit a three-run homer over the scoreboard in right-center to put the Royals ahead 8-7 in the sixth.
Demeritte hit his first major league homer to tie it in the seventh.
JACKSON COMES BACK TO DETROIT
After the game, the Tigers optioned LHP Blaine Hardy to Triple-A Toledo and selected the contract of much-traveled RHP Edwin Jackson. Jackson, who has played for 14 major league teams, spent the 2009 season in Detroit and made his only All-Star team.
GORDON'S HOME AWAY FROM HOME
Gordon's sixth-inning homer was his 15th at Comerica Park, the most by any active visiting player. He is tied with Joe Crede for fifth since the stadium opened in 2000. David Ortiz is the leader with 23 in 55 games.
Jones left the game after being hit on the left wrist in the second inning. X-rays were negative.
"We really got lucky, because our trainer was afraid on the field that it might be a fracture," Gardenhire said. "Instead it is just a deep bruise."
Dini, making his major league debut, singled to left in the sixth inning. The catcher is the 10th Royal to play his first game in the majors in 2019.
STREAK FINALLY ENDS
Hall pitched a perfect fourth inning, ending a streak of 43 straight innings where Tigers pitchers had allowed at least one baserunner.
The teams play the second of four games on Friday evening, with Kansas City's Brad Keller (7-11, 3.95) facing Jackson (1-5, 11.12).
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Olson hits 2-run, walk-off double, A’s beat Padres 5-4 in 10
— Matt Olson hit a two-run, walk-off double in the 10th inning and the Oakland Athletics rallied past the San Diego Padres 5-4 on Wednesday.
Trent Grisham's double powers Padres' win vs. A's
Gab Marcotti doesn't understand why Harry Kane thought a gentleman's agreement would be enough to leave Spurs.
Pinch-hit HR by Tellez gives Brewers 4-2 win over Pirates
— Rowdy Tellez stayed calm long enough to deliver the kind of moment that produced bedlam from an adoring home crowd.
Stallings doubles to left to tie it for Pirates
Jacob Stallings hits an RBI double deep to left field as the Pirates are now tied 1-1 against the Brewers.
Los Angeles Angels third baseman Anthony Rendon to have season-ending surgery
Anthony Rendon will be shut down for the remainder of the season so the third baseman, who has played only 58 games this season due to myriad injuries, can have surgery on his right hip.
Milwaukee Brewers reliever John Axford's season over after 1 game due to significant elbow damage
Brewers manager Craig Counsell said John Axford has significant elbow damage and is going over his options after an injury foiled the 38-year-old reliever's comeback attempt. Also, pitcher Eric Lauer joined the team's growing COVID-19 injured list.