Salvador Perez borrowed a Miguel Cabrera bat from Kansas City Royals teammate Drew Butera for the first time Wednesday.

"It's a magic stick," Butera said.

It was magic for Perez, who hit his first career grand slam, connecting in the eighth inning to rally the Royals over the Boston Red Sox 6-4.

"Miggy gave the bat to Butera when Detroit was playing here," Perez said. "Drew doesn't use it. It's too heavy for him. Today, coming into the clubhouse, I put it in my locker. I like the bat.

"Today was the first day I used it and I'll use it Friday, too, before you ask me. I don't want to break that one. I've got to call Miggy and say, 'You've got to send me some more bats.'"

The Royals have won nine of 11 and moved within a game of .500.

Perez homered over the Kansas City bullpen in left field on the ninth pitch from Robby Scott (0-1). With Boston leading 4-2, reliever Matt Barnes started the inning by walking Jorge Bonifacio and Lorenzo Cain on 12 pitches.

"We uncharacteristically lost the strike zone," Red Sox manager John Farrell said. "For a group that has been so good at not issuing too many walks over the course of the year, we had an inning that got away from us. Matt was up in the zone. He couldn't get the ball down.

"This one stings because that group has been so good, so consistent for the better part of the whole season."

Scott was summoned to face Eric Hosmer, but walked him on four pitches to load the bases for Perez. The All-Star catcher fouled off three full-count deliveries before hitting his 15th home run of the season.

"I was happy with where the pitch was, but it was too good," Scott said. "There's not much else to say about it."

According to ESPN Stats and Information, Perez was the first Kansas City player to hit a grand slam in the eighth inning or later with the Royals trailing since Frank White in 1986. Perez went 3 for 3 in the win.

Jorge Soria (3-2) worked a spotless eighth. Kelvin Herrera pitched the ninth for his 17th save in 19 chances.

Andrew Benintendi and Xander Bogaerts hit successive home runs in the Boston fourth off Ian Kennedy.

Benintendi's drive was estimated at 454 feet and landed in the right-center waterfall. The leadoff homer was Boston's first hit, and the 100th of Benintendi's career.

Five pitches later, Bogaerts went deep to left, tying the score at 2. It was the fourth time this season the Red Sox have hit back-to-back home runs.

"I tried to go inside and the ball just ran back over," Kennedy said of the homers.

Red Sox lefty Drew Pomeranz worked 6 1/3 innings, allowing two runs and six hits.

Kennedy was removed after 4 2/3 innings, giving up four runs, two earned, three hits and three walks. He has just one victory in his past 17 starts.

Errors by Kennedy and first baseman Cheslor Cuthbert helped Boston score twice in the fifth.

TRAINER'S ROOM

Royals: RHP Nathan Karns (forearm strain) threw off a flat surface, his first time tossing since having a setback 11 days ago. ... LHP Danny Duffy (oblique strain) will throw a bullpen session Friday and could begin a minor league rehab stint next week.

UP NEXT

Royals: RHP Jakob Junis will start Friday against the Blue Jays.