KANSAS CITY, Mo. (AP) — Salvador Perez and Carlos Santana hit three-run homers in the Kansas City Royals' 9-8 victory over the Detroit Tigers on Saturday night.

Perez hit his 23rd home run of the season to highlight a four-run fourth. Santana gave the Royals the lead with a three-run homer to right in a five-run seventh.

“I think it got lost there at the end, but we were down six runs,” Royals manager Mike Matheny said. “I can’t think of another team that I have been around that is as resilient as this team.”

Hanser Alberto capped the seventh with a two-run, pinch-hit triple. Nicky Lopez went 3 for 3 with an RBI and a walk from No. 9 spot to help Kansas City win its fourth straight.

“We never quit, we just competed to the last out,” Perez said. “Nobody put their head down and there was a lot of energy in the dugout.”

Jake Brentz (3-2) was the winner. Wade Davis finished for his second save of the season after Greg Holland gave up two runs in the ninth.

Kyle Funkhouser (4-1) allowed all five runs in the seventh for Detroit.

“It was not Funkhouser’s sharpest outing,” Tigers manager A.J. Hinch said. "They just kept pecking away at him and came up with a huge swing with Santana.”

The Tigers pounced on Carlos Hernández early, backed by Jeimer Candelario and Miguel Cabrera. Hernández gave up five runs, four earned, on two hits with four walks in 2 2/3 innings with two strikeouts.

A three-run home run by Candelario in the third gave Casey Mize a comfortable lead.

Mize struck out six in 4 2/3 innings but gave up four runs on six hits with a walk.

Akil Baddoo hit a two-run homer in the ninth for the Tigers, his ninth of the season and fourth in the last 11 games.

UP NEXT

Tarik Skubal (6-8, 4.18 ERA) will take the mound for Detroit in the series finale. Daniel Lynch (0-2, 15.75 ERA) will make his fourth career start for Kansas City.