CLEVELAND -- 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.
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.
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.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Ohtani hits 37th homer as Angels rally to defeat Rockies 8-7
— Shohei Ohtani continued his power display Wednesday, crushing a three-run home run, and Phil Gosselin had a go-ahead RBI single in the eighth inning for the Los Angeles Angels, who rallied for an 8-7 victory over the Colorado Rockies.
Gosselin puts Angels ahead in the 8th
Phil Gosselin comes up clutch with a go-ahead RBI single in the bottom of the eighth inning.
Story goes deep for the Rockies
Trevor Story connects on a two-run home run in the first inning vs. the Angels.
Another day, another Ohtani dinger ... belts No. 37
Shohei Ohtani keeps his home run surge going as he smashes his 37th homer of the year in the fourth inning.
Buehler, Dodgers dominate 1st-place Giants 8-0
— His rotation in limbo with two starters missing, Dodgers manager Dave Roberts knows the defending World Series champs would be in a lot worse shape without Walker Buehler.
Will Smith belts 2-run triple vs. Giants
Will Smith hits a two-run triple into the gap in right-center field to give the Dodgers a 3-0 lead vs. the Giants.