KANSAS CITY, Mo. — Salvador Perez slashed a two-out RBI single in the 10th inning to give the Kansas City Royals a 2-1 victory over the Indians on Thursday night.

Neil Ramirez (0-3) retired the first two hitters in the 10th before he walked Aldaberto Mondesi, who stole second and third to reach 30 steals for the season. Alex Gordon also walked before Perez hit Ramirez's first pitch into left field to score Mondesi for the walk-off win.

Mondesi also homered for the Royals (57-102), who are no longer in danger of matching the franchise record of 106 losses, set in 2005.

Jason Hammel (4-14) worked a scoreless 10th, following three Royals relievers who pitched four scoreless innings.

The AL Central champion Indians (89-70) got their only run in the first. Francisco Lindor led off with a single, took second on a botched pickup attempt and went to third on a balk by Royals starter Glenn Sparkman. Lindor scored on Jose Ramirez's one-out sacrifice fly.

Sparkman worked a career-high five innings, allowing five hits with no walks and two strikeouts.

Josh Tomlin went 4 2/3 innings for the Indians, allowing Mondesi's homer in the third.

The Indians had runners at second and third with two out in the eighth when Yandy Diaz chopped a slow roller between third baseman Hunter Dozier and shortstop Mondesi, who made a quick scoop and an off-balance throw to get Diaz.

Hits leader

The Royals' Whit Merrifield had two hits and moved into the major league lead with 188, one ahead of the Atlanta Braves' Freddie Freeman. Merrifield has 53 multi-hit games on the season.

Trainer's room

Royals: The Royals are healthy except for four players on the long-term disabled list — third baseman Cheslor Cuthbert (strained lower back), outfielder Jorge Soler (fractured toe), right-hander Jesse Hahn (elbow surgery) and right-hander Nate Karns (elbow inflammation). Left-hander Danny Duffy (shoulder inflammation) also has been shut down for the season.

Indians: Infielder Erik Gonzalez entered the concussion protocol after getting hit in the head by a pitch against the White Sox on Wednesday. Manager Terry Francona said Gonzalez experienced some nausea after getting beaned, but "is doing much, much better." Gonzalez traveled with the team but there is no timetable for his return. ... First baseman Yonder Alonso got the day off. ... Francona said outfielder Michael Brantley, who left Tuesday's game after fouling a pitch off his right calf and then returned to the lineup Wednesday, sat for his regular day off and has no lingering effects.