Will Rhymes hit his first major league homer and Alex Avila drove in three runs and made a spectacular defensive play to lead the Detroit Tigers past the Kansas City Royals 7-5 Monday night.

Detroit trailed 5-4 going into the bottom of the sixth inning, then took the lead on Rhymes' two-run homer off Zack Greinke. The play originally was ruled an RBI triple, but video replays showed the ball hit the bottom of a safety railing above the right-field fence. Umpires reviewed the play and reversed the call.

Avila finished the scoring with a solo homer in the eighth, an inning after the catcher flipped over a railing and landed headfirst in the Royals' dugout while catching Brayan Pena's foul pop. He almost duplicated the catch with two outs in the ninth, but couldn't hang on.

Yuniesky Betancourt matched a career high with four hits for Kansas City, including a three-run homer.

Brad Thomas (6-2) earned the win with 1 2-3 innings of shutout relief. Tigers starter Rick Porcello gave up five runs and 12 hits in 5 1-3 innings.

With closer Jose Valverde still unavailable due to elbow soreness, Ryan Perry and Phil Coke split the ninth. Coke got two outs for his second save.

Greinke (9-13) couldn't take advantage of an unusual amount of run support, giving up six runs — five earned — on eight hits and two walks in six innings. Rhymes' homer was just the second Greinke had allowed in his last eight starts.

Detroit built an early 4-0 lead against Greinke. Ramon Santiago provided the first run with an RBI single in the second before the Tigers added three in the third.

Johnny Damon, Don Kelly and Miguel Cabrera started the inning with singles, the last driving in a run, and Avila added a two-run single.

The Royals, though, went ahead with five runs in the fifth. Kansas City started the inning with six straight hits, including Betancourt's three-run shot. Billy Butler ended the streak by grounding into a bases-loaded double play, but the tying run scored on the play.

Wilson Betemit then beat out an infield single, allowing Gregor Blanco to score the fifth run of the inning.

The Royals had a chance to add to their lead in the sixth, but Mike Aviles popped out with the bases loaded. In the seventh, Kila Ka'aihue was thrown out trying to stretch a single into a double, and Avila ended the inning with a spectacular catch of Pena's popup.

NOTES: Brandon Inge's two strikeouts gave him 1,094 in his career, leaving him five short of Lou Whitaker's franchise record. Whitaker played 1,105 more games with the Tigers than Inge has. ... Rhymes was shunned by most of his teammates when he finally arrived in the dugout after his long wait on third base while his homer was being reviewed. After about 30 seconds, though, he was mobbed by most of the roster. The homer came in his 164th career at-bat. ... Greinke needs one more inning to pass Al Fitzmorris for 10th place on the Royals' career list.