Perez homers in 9th; Royals win, 5-4

? Salvador Perez gave the Royals a late lift Wednesday night heading into a key midseason series.

Perez hit a go-ahead, three-run homer in the ninth inning, and Kansas City beat Tampa Bay 5-4 to take two of three from the Rays.

The second-place Royals return home tonight to begin a four-game series against AL Central-leading Detroit, which has a 41/2-game lead.

“That was a huge win for us,” Kansas City manager Ned Yost said. “That’s the difference between 41/2 games back compared to 51/2 games back. Definitely nice to have a little momentum going home for the last four games before the All-Star break. It’s a lot better than the alternative.”

Kirby Yates (0-1), the fifth Tampa Bay reliever, entered with runners at the corners and gave up Perez’s one-out shot into the left-field corner.

Perez wasn’t sure if the drive would stay fair or even clear the low fence near the foul pole.

“As soon as the ball hit on the other side, good for us,” he said.

It’s been a big week for Perez, chosen Sunday to start at catcher for the American League in next week’s All-Star game.

Aaron Crow (4-1) pitched a scoreless eighth, and Greg Holland got three outs for his 24th save.

All-Star outfielder Alex Gordon (sprained right wrist) and third baseman Mike Moustakas (flu) were not in Kansas City’s starting lineup. In addition, left-hander Jason Vargas was taken to the hospital for an appendectomy.

Gordon entered as a ninth-inning defensive replacement. He will have an MRI exam today.

Kevin Kiermaier went 4-for-4 with a grand slam for the Rays.

Tampa Bay, which lost for the fourth time in 14 games, missed a chance to gain a game on AL East-leading Baltimore.