Jordy Mercer fired up his teammates and helped them end to another skid in a sorry season.
Mercer put the Tigers ahead with their third home run of the fourth inning, and Detroit overcame a three-run deficit in a victory for the first time this year by beating the Kansas City Royals 6-4 Thursday.
"That excited the dugout," Detroit manager Ron Gardenhire said. "We played pretty good baseball in this series."
Detroit, which stopped a four-game losing streak, is a big league-worst 41-97 and Kansas City at 51-90 also is on pace for more than 100 losses.
Kansas City built a 3-0 lead in the second against Matthew Boyd (8-10) when Whit Merrifield hit a two-run single and scored on Adalberto Mondesi's double. Merrifield had four hits, one shy of his career high.
Harold Castro started the comeback with an RBI single in the third, and Detroit took a 4-3 lead in the fourth off Glenn Sparkman (3-11) when Brandon Dixon and Dawel Lugo homered on consecutive pitches with one out and Mercer went deep with two outs for the Tigers' first three-homer inning this year.
"We've talked about the importance of tack-on runs, and we just couldn't do it," Royals manager Ned Yost said. "We couldn't tack on runs until the eighth inning. We tacked on one, and I was hoping that one run would be big. It looked like it was starting to loom big in the ninth."
Pinch-hitter Willi Castro had a two-run single in the sixth off Josh Staumont. Castro replaced Mercer, who left because of a bruised right wrist. An X-ray was negative.
Cheslor Cuthbert had a run-scoring grounder in the eighth against Bryan Garcia.
Boyd allowed three runs and 10 hits in 6 1/3 innings, and Joe Jiménez got three outs for his fifth save in six chances.
"I think he controlled the game," Gardenhire said of Boyd. "He got into a little bit of a groove. I think he made some minor adjustments. The first couple of innings his breaking ball was going across the zone. He started getting it to go down. Once he did that, he was fine."
Sparkman gave up four runs and seven hits in four innings.
Tigers: After completing a suspended game that resumes with Detroit trailing Oakland 5-3 in the seventh inning, RHP Spencer Turnbull (3-14, 4.45 ERA) starts for the Tigers and Homer Bailey (12-8, 4.96 ERA) for the Athletics. The game was suspended by rain in Detroit on May 19.
Royals: In Kansas City's first game against the Marlins since 2016, RHP Jorge López (2-7, 6.61 ERA) starts at Miami on Friday against RHP Pablo López (5-7, 4.89 ERA).