Kansas City manager Ned Yost saw his bullpen retire David Ortiz in a big spot. The problem was reliever Kelvin Herrera made a bigger mistake to Daniel Nava.
Nava belted a three-run homer one batter after Ortiz bounced into a double play, lifting the Red Sox to a 4-3 win over the Royals on Saturday afternoon.
Jonny Gomes doubled against Tim Collins starting the eighth and Dustin Pedroia walked. After Ortiz grounded into the double play, Herrera (1-2) entered and walked Mike Napoli on four pitches and before Nava homered to right.
"We were one pitch away from winning that ballgame," Yost said, explaining that his strategy worked by letting the left-handed throwing Collins face two righties before Ortiz.
"I wanted him to face Ortiz, and he has three pitches to face righties," Yost said.
After honoring the victims and the survivors of the Boston Marathon bombings, the Red Sox kept on with their best start in 11 years by beating the Royals as Ortiz played his first game since last summer.
But it was a hanging change up to Nava that hurt the Royals.
"I left it in the middle," Herrera said. "I paid the price."
Royals starter James Shields gave up one run and four hits in six innings with eight strikeouts and three walks.
"He struggled to find his control a little, which got his pitch count up," Yost said.
Shields allowed three or fewer runs for the third time in four starts.
Lorenzo Cain went 4 for 4 with a solo homer for the Royals.
"He was lights out once again," Cain said. "He's been doing that all year for us. We've just got to continue to battle and find a way to score more runs for him."
The Red Sox wore white home jerseys with "Boston" on the front instead of the customary "Red Sox." The shirts will be auctioned off for a fund to support victims of the bombing.
"It was electric, man," Cain said of the pregame. "To go through that and see everybody getting into it and what this city went through, just to be a part of it was amazing."
Kansas City players and staff wore a "B Strong" patch on the front of their jerseys. Neil Diamond showed up and sang Red Sox favorite "Sweet Caroline" before the bottom of the eighth.
The 37-year-old Ortiz injured his right Achilles tendon running the bases on July 17 and appeared just once in Boston's final 72 games, against the Royals on Aug. 24.
Ortiz was bothered by inflammation in both heels during spring training and didn't play in any exhibition games. He was 2 for 4 in his return, tying the score 1-all with a sixth-inning RBI single off James Shields.
Following the emotional pregame ceremony, the Red Sox won their sixth straight games -- four since Monday's bombings at the marathon finish line.
Clay Buchholz (4-0) allowed eight hits in eight innings, struck out six and walked one. Andrew Bailey allowed Cain's leadoff homer over the Green Monster in the ninth, his fourth hit of the game, then got his third save when Alex Gordon hit a game-ending groundout with two on.
Buchholz extended his scoreless streak to 22 innings before Cain doubled in the fifth and scored on Jeff Francoeur's single.
Cain doubled leading off the seventh and scored on Salvador Perez's two-out RBI triple for a 2-1 lead.
NOTES: Cain is 11 for his last 16. ... Shields entered just 2-9 with a 5.86 ERA in his career in Fenway Park. ... Boston OF Shane Victorino left the game with lower back tightness. ... Boston's starters have allowed three or fewer runs in all 16 games this season.