BOSTON (AP) -- The Boston Red Sox had the emotion and a seven-game winning streak on their side. The Kansas City Royals had the pitching and enough timely hitting to come away with a doubleheader sweep.

Lorenzo Cain walked with the bases loaded in the 10th inning to give Kansas City a 5-4 victory in the second game of a doubleheader on Sunday as the Royals swept a Red Sox team coming off an emotional week.

''Doubleheaders haven't fared too well for us. We haven't won many series here,'' said Billy Butler, who tied the game with an eighth-inning homer. ''We were real close to winning all three of them. (Daniel) Nava had the big hit yesterday, and we had the big hits today.''

Ervin Santana (2-1) pitched seven strong innings in the opener, when Kansas City won 4-2. Kelvin Herrera (2-2) got the win in the night game, a makeup of the one postponed on Friday night because of the city-wide lockdown during the hunt for the Boston Marathon bombers.

Alex Gordon had three hits in the second game, including a single with one out in the 10th. Alcides Escobar walked and, after Billy Butler struck out, Eric Hosmer reached on an infield single - his fourth hit of the day.

Andrew Miller (0-1) walked Cain on four pitches to bring home Gordon, who scored his third run of the game. Herrera allowed one hit and one walk, striking out three in two innings.

''I thought we had great at-bats in crucial situations,'' Royals manager Ned Yost said. ''It was a great at-bat right there. He laid off four pitches to plate the winning run. A lot of times guys get overanxious there.''

Boston led 4-3 before Butler tied it with his third homer of the year, clearing the Green Monster. The Red Sox put runners on first and second in the ninth, and Mike Napoli hit a long fly ball to center field but Cain caught it short of the warning track.

''He's come up with some big hits for us in some RBI situations,'' Red Sox manager John Farrell said. ''Unfortunately, that last at-bat where he squares up the ball to the track in center field is somewhat of a picture of this entire day, where we miss a couple of opportunities when we had men in scoring position. And that was the difference in the two games today.''

It was a disappointing ending to an emotional weekend for the Red Sox, who returned on Thursday night with a six-game winning streak and a hometown still reeling from the Boston Marathon bombings. Friday's game was postponed while police searched for the suspects, and on Saturday the emotion of the pregame ceremony seemed to carry the ballclub to a seventh victory in a row.

A more subdued atmosphere - and smaller crowds - greeted the teams on Sunday, but there were still some signs that things had changed: The American flag in left-center field remained at half-staff, Red Sox players wore a ''B STRONG'' patch on their jerseys and law enforcement officers were cheered whenever they were shown on the scoreboard.

In his first two at bats on the day game, Jonny Gomes used a bat with the words ''Boston Strong'' and the names of the four people killed in the bombings and its aftermath. He popped out and grounded out, then said he planned to auction off the bats for charity.

''It was my agent,'' Gomes said, standing at his locker with the bats leaning against his stall after Boston's 4-2 loss in the first game against Kansas City. ''He made it happen.''

For his third straight start, Santana allowed runs in the opening inning then settled down, allowing two runs on six hits with no walks and seven strikeouts. Santana has given up four runs and nine hits in his first innings, and one run on 12 hits in his other 20.

''Once he gets settled in, he gets on a nice roll,'' Yost said.

The Red Sox loaded the bases with two outs in the eighth against Bruce Chen and Aaron Crow, but Jarrod Saltalamacchia grounded out to Crow. Greg Holland pitched a perfect ninth for his fourth save in five opportunities.

The Royals scored three runs in the fourth. Salvador Perez's two-run single broke a 2-2 tie against Ryan Dempster (0-2), who had struck out the previous two batters.

Dempster allowed four runs on six hits in seven innings, striking out eight and walking three. That ended a season-opening streak of 16 games by Red Sox starters of allowing three runs or less, tying an AL record achieved by the Oakland Athletics in 1978 and 1981.

Notes: Red Sox RF Shane Victorino missed his first game of the season after leaving Saturday's 4-3 win with back spasms. ... Dustin Pedroia has reached base in all 18 games, the most consecutive games to start a season by a Red Sox 2B, breaking the record set by Pete Runnels in 1959. ... Jacoby Ellsbury has hit in 11 straight games. ... Cain had hits in seven straight at bats before grounding out on the first then getting his double in the fourth of the day game. ... The Royals recalled LHP Will Smith from Triple-A Omaha. ... Felix Doubront (1-0) pitches for the Red Sox against A.J. Griffin (2-0) in the opener of a three-game series with the Oakland Athletics on Monday night at Fenway Park. ... Kansas City is off Monday before starting a three-game series at Detroit on Tuesday night with Wade Davis (2-0) pitching for the Royals against Max Scherzer (1-0). ... Koji Uehara had gone 18 1-3 scoreless innings before allowing Butler's homer in the eighth of the night game.