KANSAS CITY, Mo. — Salvador Perez hit a three-run home run, Maikel Franco hit a go-ahead homer in the sixth inning and the Kansas City Royals beat the Detroit Tigers 8-7 on Thursday night.

Franco's eighth homer of the season put the Royals ahead in a game between two teams eliminated from postseason play. Adalberto Mondesi had four hits and two RBIs, Perez had two hits and three RBIs, and Jorge Soler plated one.

"Being patient and just trying to do my job," Mondesi said. "I just want to get on base because Salvy is playing so well."

Miguel Cabrera continued his hot streak with a two-run homer in the fifth to tie the game at 4. He has four home runs and 12 RBIs in the past four games.

"He's feeling good and his legs are strong," Tigers interim manager Lloyd McClendon said. "He's got a lot of issues that are behind him from a physical standpoint, and next year should only get better."

Tigers starter Michael Fulmer was pulled after 2 1/3 innings having given up four runs and seven hits on just 42 pitches. Tyler Alexander (2-3) got the loss, allowing a run and two hits over 2 2/3.

"The first inning was a rough start," McClendon said. "They took advantage of it with the big three-run homer. He actually settled down a little bit after that and made some pretty decent pitches."

The Royals got to Fulmer in the first with singles by Whit Merrifield and Mondesi, and Perez hit a three-run homer on the ensuing at-bat into the left field bullpen.

"You could tell the guys just kept coming and putting on pressure," Royals manager Mike Matheny said.

Willi Castro hit a two-run home run for Detroit, his sixth of the season, to make it 3-2 in the third. Castro, Cabrera and Harold Castro had RBIs in the eighth off right-hander Josh Staumont, who gave up three runs and got just two outs.

Royals starter Kris Bubic allowed four runs, eight hits and three walks over 4 2/3 innings, striking out five. Jesse Hahn (1-0) got four outs and his first major league win since 2017, and Jake Newberry completed his first career save.

"I thought he looked good in the first," Matheny said of Bubic. "Had a little trouble later, but overall he's been making better pitches with the fastball. Newberry did a great job finishing for us."

Soler scored Hunter Dozier on a double in the sixth, and Mondesi had a two-run single to extend the lead to 8-4.

ROYAL RETIREMENT

Before the game, Royals OF Alex Gordon announced his retirement following this season. The second overall pick in 2005 will leave the game playing all 13 seasons for the Royals. He has won seven Gold Gloves, second most in franchise history behind Frank White's eight.

ROSTER MOVES

The Royals recalled LHP Richard Lovelady and optioned RHP Scott Blewett.

TRAINING ROOM

Tigers 3B Jeimer Candelario left the game (low back tightness) and is day-to-day.

Royals OF Franchy Cordero will be ready to play on Friday after exiting the game with leg cramps.

UP NEXT

Detroit will send RHP Spencer Turnbull (4-3, 3.83) to the hill Friday night as the Royals counter with RHP Brad Keller (4-3, 2.77), who will look to rebound after giving up five runs in five innings on Sunday against Milwaukee.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports