CLEVELAND (TNS) — In the moments after the Royals lost a series finale in Baltimore to the Orioles on Thursday night, Royals catcher Salvador Perez sat at his locker in Camden Yards and struggled to muster a smile.

He'd hit a grand slam on his 28th birthday. That was cool, he said.

But it wasn't enough.

Given another chance to provide a lift against the Indians on Friday in Cleveland, however, Perez delivered in spades.

He hit a two-run homer in the seventh inning off All-Star setup man Andrew Miller. The ball cut through the chilled air at Progressive Field and landed in left field 4.7 seconds after the barrel of Perez's bat connected with Miller's 83 mph slider.

The Royals beat the Indians 10-9. After starting pitcher Jason Hammel blew a 4-3 lead and surrendered nine runs on six hits in 3 2/3 innings, the Royals' bullpen held strong through 5 1/3 frames.

After the Royals had fallen into an early 3-0 hole, shortstop Alcides Escobar drove in his first run of the night and Jon Jay hit a game-tying double with two outs.

Hammel recovered, too. He retired seven consecutive batters after Yonder Alonso capped the Indians' three-run first with a solo home run. He finished the third inning with a manageable 43 pitches under his belt.

But for the second game in a row, a Royals starting pitcher couldn't maintain control. Hammel threw 46 pitches in the fourth inning alone. He allowed seven of eight batters to reach base; he issued three walks, gave up a grand slam to Michael Brantley and surrendered six runs.

Yet the Royals let neither the 9-4 disadvantage nor the daunting prospect of facing Miller — who hadn't given up a homer to an American League Central opponent since Joe Mauer hit one in Miller's first game with the Indians on Aug. 1, 2016 — faze them.

They chipped away, instead. Mike Moustakas roped an RBI double in the sixth. Two batters later, Lucas Duda hit his third double of the night to shrink the Indians' lead to 9-7. Escobar, who hadn't driven in four runs in a game since June 17, 2015, hit an RBI single to pull the Royals within one run of a tie.

In the next inning, Perez strode to the plate.

When Perez trotted home moments later, Hammel's disastrous outing had suddenly evaporated from the foreground.

The Royals improved to 13-25 and gained one game on the AL Central-leading Indians.