DETROIT — Buck Farmer kept throwing changeups to Mike Moustakas, and the Kansas City slugger eventually adjusted.

"After the first three or four, I was starting sitting on it," Moustakas said. "Finally, he ended up leaving one up, and I was able to get a good swing on it."

Moustakas hit a tiebreaking, three-run homer in the seventh inning, and the Kansas City Royals outlasted the Detroit Tigers 8-5 on Sunday to earn a split of their four-game series.

Abraham Almonte hit a grand slam in the sixth to give the Royals a 5-2 lead, but Detroit tied it with three runs in the bottom of the inning.

Kansas City took the lead again when Drew VerHagen (0-1) walked two batters in the seventh and Moustakas hit a drive to right off Farmer. It was the sixth pitch of the at-bat.

The Royals won for only the second time in 12 games, and Moustakas extended his hitting streak to 14.

Kevin McCarthy (1-0) became the first Kansas City reliever credited with a win this season, although that came after he let the lead slip away in the sixth. Brian Flynn pitched two scoreless innings of relief for the Royals, and Kelvin Herrera worked a perfect ninth for his fourth save.

Detroit starter Francisco Liriano took a no-hitter into the sixth before Whit Merrifield led off with a homer to left. With two on and one out, Alex Wilson came on in relief and walked his first batter to load the bases. Almonte followed with a drive to right for his second career grand slam .

"I came into a big spot and I didn't do my job," Wilson said. "There's nothing puzzling about it — I made terrible pitches."

Royals starter Eric Skoglund walked the first two hitters of the bottom of the sixth, then was relieved by McCarthy. Nicholas Castellanos greeted him with an RBI single, and an error by left fielder Paulo Orlando left men at second and third. One out later, JaCoby Jones hit an RBI single, and James McCann added a sacrifice fly to make it 5-all.

"It is frustrating that Frankie gave us a chance and our hitters got us right back into the game, but our bullpen couldn't get the ball over the plate," Tigers manager Ron Gardenhire said. "We had some guys who weren't available today, so we were mixing and matching, but no matter who we bring in, we need them to throw the ball over the plate and get outs."

The Tigers took a 2-0 lead in the first on an RBI groundout by Miguel Cabrera and a run-scoring single by Castellanos.

Castellanos had three hits.

BIG SERIES

Almonte had a big ninth-inning hit in a win Friday night, then added three more hits Saturday. He wrapped up the series in impressive fashion with his grand slam.

"I've been feeling better every game, every at-bat," Almonte said. "I'm getting more confident, I'm seeing the ball better."

STRONG HOMESTAND

Although they finished on a sour note, the Tigers went 5-3 on their homestand, averaging 6.4 runs a game.

"We need to keep playing the way we played this week," leadoff hitter Leonys Martin said. "We're not going to win every game, but we will give ourselves a chance. That's all you do. Play 27 outs and make sure you have a chance."

TRAINER'S ROOM

Royals: C Salvador Perez (left knee sprain) caught seven innings and went 3 for 4 with a homer Saturday night on a rehab assignment with Triple-A Omaha. He went 1 for 3 as a DH on Sunday. ... OF Alex Gordon (left hip tear) went 1 for 2 with two walks Saturday and 1 for 3 on Sunday. "They're close," Kansas City manager Ned Yost said.

UP NEXT

Both teams are off Monday. The Royals begin a two-game home series against Milwaukee on Tuesday night. Kansas City sends RHP Ian Kennedy (1-2) to the mound against RHP Zach Davies (1-2). Former Royals star Lorenzo Cain plays for the Brewers now after signing with Milwaukee in January.

The Tigers begin a three-game series at Pittsburgh on Tuesday night, with Detroit RHP Jordan Zimmermann (1-0) facing RHP Chad Kuhl (2-1).

___

More AP baseball: https://apnews.com/tag/MLBbaseball

___

Follow Noah Trister at www.Twitter.com/noahtrister