CLEVELAND — Justin Masterson managed to hang around for 6 1-3 innings and win for the sixth time at home, leading the Cleveland Indians to a 6-3 victory over the Kansas City Royals on Wednesday night.

Masterson (9-5) sidestepped some early trouble without giving up any runs and improved to 6-1 with a 2.29 ERA in nine starts at Progressive Field. The right-hander struck out eight while allowing two runs and nine hits.

Michael Brantley hit a pair of solo homers for the up-and-down Indians, who moved within 3½ games of first-place Detroit in the AL Central. Mike Aviles drove in two runs and Michael Bourn scored twice for Cleveland.

Unable to get a hit for four innings off Luis Mendoza (2-4), Brantley homered in the fifth and the Indians added three runs in the sixth. Brantley connected again in the eighth.

Despite the loss, the Royals have won 11 of 15.

Masterson, as close to an ace as the Indians have in their rotation, is 5-0 in his last six starts at home and has won nine of his past 13 decisions in Cleveland.

It wasn't a certainty he would survive the first few innings as the Royals put two runners on in the first and second but failed to score. Kansas City stranded eight runners in the first five innings and Masterson got a big defensive play by first baseman Mark Reynolds to get out of a pickle in the fourth.

Masterson was lifted in the seventh, and although he was far from dominant, Indians fans gave him a warm ovation as he headed to the dugout.

The Indians, who have struggled to score lately, didn't get their first hit off Mendoza until the fifth and then chased the right-hander during their three-run sixth.

With two on and none out, Aviles hit a ball to deep left that probably should have been caught by Alex Gordon, but the two-time Gold Glove winner dropped it, allowing Drew Stubbs to score and tie it at 2.

Jason Kipnis followed with a well-timed bunt single to load the bases and Mendoza threw four straight balls to Carlos Santana, forcing in Bourn with the go-ahead run.

Tim Collins then came in and allowed Brantley's sacrifice fly that made it 4-2, but after giving up a single, he kept the Royals within two by striking out pinch hitter Ryan Raburn and getting Lonnie Chisenhall on a groundout.

However, the Indians tacked on an insurance run in the seventh when Bourn doubled, stole third and scored on Aviles' fly ball to right.

Cleveland also got solid relief work from Bryan Shaw, who pitched 1 2-3 scoreless innings.

Mendoza, who had just one win in his previous six starts, coasted through the first four innings, allowing only a two-out walk in the first. He was handling the Indians with ease and appeared in complete control.

The right-hander didn't make a mistake until Brantley turned on his fastball leading off the fifth, lining a shot into the right-field seats to trim Kansas City's lead to 2-1.

After stranding four runners in the first two innings, the Royals finally pushed a run across in the fourth off Masterson, who was fortunate to only be down 1-0.

David Lough singled with one out and Mike Moustakas doubled. When Lough rounded third, coach Eddie Rodriguez was nearly three-quarters of the way to home with his arms raised over his head to stop Lough, who ran threw a stop sign in the ninth on Tuesday and prevented the Royals from tying the game.

Elliot Johnson followed with an RBI single, but the Indians kept the damage to a minimum when Masterson struck out Alcides Escobar and Reynolds dived to his right to snag Gordon's liner and rob him of a two-run double.

The Royals made it 2-0 in the fifth on Lough's RBI single.

NOTES: Indians closer Chris Perez will not be activated from the disabled list on Friday as originally planned. Perez struggled with his mechanics during a rough, one-inning outing — five runs, three homers — at Double-A Akron on Tuesday and the club wants him to throw a bullpen session before deciding the next move. Francona said Perez probably will make another rehab appearance. ... The Indians have won six of eight after dropping eight in a row. ... The Royals are in a stretch of playing 13 of 15 games within the AL Central.