KANSAS CITY, Mo. (AP) The Boston Red Sox did a better job of walking a tightrope than the Kansas City Royals.
At least, that's how manager John Farrell summed up Thursday night's 6-3 victory.
The last-place Red Sox took advantage of three critical errors by the first-place Royals, and managed to deal with their own costly miscue to end a frustrating four-game losing streak.
''Both sides were capitalizing on errant throws or hit-by-pitches,'' Farrell said. ''Any time you give a club an extra out, you're walking a tightrope, and that was the case tonight.''
Clay Buchholz (8-8) allowed three runs, two earned, over 6 1-3 innings for the Red Sox. He turned a one-run lead over to the Boston bullpen, and it preserved his sixth straight win against the Royals. Edward Mujica handled a perfect ninth for his fifth save.
Kansas City's advantage in the AL Central dropped to a half-game over idle Detroit.
''I felt good with my off-speed stuff early,'' said Buchholz, who is starting to resemble the All-Star of last year. ''With the lefties they have in their lineup, it's a pitch I needed to have any chance of winning tonight.''
Liam Hendriks (1-2) failed to last three innings while making a spot start for left-hander Danny Duffy, who is shelved with shoulder soreness. The Royals' defense didn't do Hendriks any favors, either, making all three errors in the first four frames.
''There are no focus issues there,'' Royals manager Ned Yost said later.
''That's baseball,'' Royals shortstop Alcides Escobar added. ''That happens.''
Nearly every run scored in the game was a product of some sort of mishap, though.
In the second inning, Boston's Will Middlebrooks doubled and then scored when Eric Hosmer allowed a two-out grounder by Christian Vazquez to get by him into right field. It was the Gold Glove first baseman's third error in four games and his 10th of the season.
The Royals pulled ahead in the bottom half, getting a two-out double from Lorenzo Cain and back-to-back singles by Escobar and Nori Aoki. On Aoki's hit, Escobar rounded third wide, and first baseman Mike Napoli tried to throw him out. The cross-diamond throw nearly wound up in the visiting dugout, and the error allowed Escobar to trot home for a 2-1 lead.
Boston pulled back ahead in the third. Mookie Betts singled, Xander Bogaerts walked, and Yoenis Cespedes was hit by a pitch to load the bases. Hendriks walked Napoli to tie the game, and Middlebrooks singled up the middle to give the Red Sox the lead.
They added another run in the fourth, thanks in part to two more errors.
Kansas City pieced together a promising rally in the sixth. Josh Willingham was hit by a pitch leading off, and Mike Moustakas and Lorenzo Cain hit back-to-back two-out singles to make it 4-3. But Buchholz bounced back to strike out Escobar and preserve the lead.
Jemile Weeks added a two-run double in the eighth to give Boston a cushion.
''We're struggling offensively a little bit,'' Yost said. ''Plus, Hendriks went out, had a really good first inning. The error in the second inning cost him a run. He lost all his tempo in the third inning. He was really rushing his delivery to the plate.''
Red Sox: 2B Dustin Pedroia had surgery Thursday to repair tendon damage and clean out scar tissue in his troublesome left wrist. He is expected to heal in about six weeks. ''It created more range of motion and instant relief than Dustin has felt,'' Farrell said.
Royals: RHP Greg Holland (muscle stiffness) felt good after throwing Monday, Yost said, and could have been available. ... Duffy said he hopes to begin throwing in the next couple of days. He is due to start Tuesday against the White Sox.
Red Sox: RHP Allen Webster (3-3, 6.47) faces Kansas City for the first time since April 2013.
Royals: RHP Yordano Ventura (12-9, 3.25) tries to win his fourth consecutive start.