BOSTON – David Ortiz has been in the middle of some of Fenway Park’s greatest moments. None of them seemed more important than his role in one Saturday.

Ortiz helped the Red Sox honor the victims and survivors of the Boston Marathon bombings, then played in his first game since last summer, a 4-3 victory against the Kansas City Royals capped by Daniel Nava’s three-run homer in the eighth inning.

“I try to take the positive side of things and ride with it,” Ortiz said. “But I wanted to win this game badly.”

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 bombings.

Kansas City players and staff wore a “B Strong” patch on the front of their jerseys. Neil Diamond sang “Sweet Caroline” before the bottom of the eighth.

“I think today was different because we haven’t been through what we’ve been through this past week,” Ortiz said. “Driving around and looking around at people’s faces, it was a very emotional day here just looking at those guys that were injured by those bombs going off and watching the news nearly every day. It was painful, very painful. Today I could see people opening their chest and letting it go.”

Ortiz, 37, injured his right Achilles tendon running the bases July 17 and appeared just once in Boston’s final 72 games.

Ortiz was bothered by inflammation in both heels in spring training and didn’t play in any exhibitions. He was 2 for 4 in his return, making it 1-1 with a sixth-inning RBI single off James Shields.

Following an emotional pregame ceremony, the Red Sox won their sixth straight game — four since Monday’s bombings at the marathon finish line.

“Knowing everything that went into the day for the city, for us to get the win, it came in a special way, special fashion,” Nava said. “It made it all that more important.”

Clay Buchholz (4-0) allowed eight hits in eight innings, struck out six and walked one. Andrew Bailey allowed Lorenzo Cain’s homer in the ninth, his fourth hit, then got his third save when Alex Gordon hit a game-ending groundout with two on.

“Just a fantastic finish to an otherwise great day,” Red Sox Manager John Farrell said.

Cain even was moved by the pregame.

“It was electric, man,” Cain said. “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.”

Shields gave up one run and four hits in six innings, with eight strikeouts and three walks.

Buchholz got 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. But Jonny Gomes doubled against Tim Collins starting the eighth and Dustin Pedroia walked. After Ortiz grounded into a double play, Kelvin Herrera (1-2) walked Mike Napoli on four pitches and Nava homered to right.

Herrera said it was a poorly thrown change-up.

“I left it in the middle,” he said. “I paid the price.”

NOTES: Boston outfielder Shane Victorino left with lower back tightness. Farrell said he “twisted a little awkwardly trying to lay down a bunt.” He’ll be reevaluated (Sunday) morning.