CLEVELAND (AP) Jose Ramirez swung and felt something crack.
It was a bone in his right hand. It may as well have been Cleveland's postseason hopes.
Ryan O'Hearn led off the 10th inning with his second homer of the game, sending the Kansas City Royals to a wild 9-8 win Sunday over the Indians, whose playoff chances were severely rocked by losing Ramirez to a broken right hand.
Down 8-4, the Indians fought back and tied it in the ninth against Ian Kennedy (1-2) on Francisco Lindor's solo homer and Franmil Reyes' stunning three-run shot with two outs.
But Nick Goody (3-1) got too much of the plate with a four-seam fastball and O'Hearn drove it over the right field wall as the Royals salvaged a back-and-forth series finale to snap a four-game losing streak.
Losing the game was secondary to the Indians, who will be without Ramirez as they try to catch Minnesota in the AL Central or win a wild card. The two-time All-Star will undergo surgery Monday in New York to repair a hamate bone he fractured Saturday night.
The Indians, who have dealt with major injuries all season, won't know how long Ramirez will be out until after the procedure. But they know he won't be at third base or batting fifth for the next few weeks - and perhaps the remainder of the season.
''We've got to deal with it,'' said starter Shane Bieber, who settled in after a few rough innings. ''It's a big blow. We're not really faced with a choice, it's just next man up.''
Jorge Lopez worked the 10th for his first major league save.
Ramirez, who awakened from a puzzling, early-season offensive slump in time to propel the Indians back into postseason contention, feared the worst when he was forced to leave Saturday's game in the first inning.
''You still try to stay optimistic and see if they can tell you better news,'' he said through a translator. ''But I knew something was bad when it happened.''
Trailing by four and down to their final strike, the Indians tied it against Kennedy.
Lindor homered with one out before Kennedy walked Carlos Santana with two outs and gave up a single to Yasiel Puig.
Kennedy's wild pitch moved the runners up and Reyes, whose homer leading off the eighth pulled Cleveland to 8-4, brought them home with a 423-foot shot to left, rewarding Indians fans who hung around after the team fell behind 8-3.
''It was crazy,'' Reyes said. ''Honestly, it was one of the best moments in my life, not my career. It was great.''
Kansas City's five-run eighth was triggered by shortstop Lindor's error and highlighted by Jorge Soler's two-run homer - a 437-foot drive.
Kevin Plawecki hit a two-run homer for Cleveland, which dropped 3 1/2 games behind the first-place Twins. The Indians still hold a wild-card spot in a tight race with Tampa Bay and Oakland for the two AL berths.
O'Hearn said the Royals didn't hang their heads after Cleveland's four-run ninth.
''As soon as the inning was over, I was the first guy up,'' he said. ''I went in there, got my stuff and got ready to hit. It can be tough. It's part of the game. Nobody as far as I know was down.''
Soler's homer moved him into a tie with Steve Balboni for the second-most in a season in franchise history. Balboni hit 36 in 1985. Mike Moustakas set the club record with 38 in 2017.
Bieber shook off a wobbly first few innings and stuck around for seven. After allowing the homer to O'Hearn in the third, the All-Star Game MVP retired his final 13 batters, recording seven of his eight strikeouts in that span.
Rookie infielder Yu Chang stepped in for Ramirez and got his first two major league hits.
He opened the seventh with a triple that caromed off the wall at an odd angle, and for a moment it appeared Chang might have a chance for an inside-the-park homer before he was held at third.
''He's pretty mellow and just does his thing and he doesn't put too much pressure on himself to begin with,'' said Bieber, who played with Chang in the minors. ''He came up and produced right away and he just played like himself.''
Royals left-hander Eric Skoglund was sharp in his season debut, allowing only two hits in five innings. The left-hander was suspended for the first 80 games for violating Major League Baseball's drug prevention and treatment program.
Royals: SS Adalberto Mondesi (dislocated left shoulder) has played six games on a minor league rehab assignment, but no timetable has been set for his return. He was injured diving for a foul ball on July 16.
Indians: RHP Carlos Carrasco pitched one inning of relief for Triple-A Columbus as he continues his comeback after being diagnosed with leukemia. Carrasco, who threw 26 pitches, could potentially join Cleveland's bullpen in the next few weeks.
Royals: Open a 10-game homestand, their longest of the season, with RHP Brad Keller (7-13, 3.95 ERA) on the mound against Oakland.
Indians: Following an off day, RHP Adam Plutko (5-3, 4.54) starts the opener of a three-game series Tuesday in Detroit against Spencer Turnbull (3-12, 4.05).
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports