The Red Sox were swept in the day-night doubleheader Sunday at Fenway Park, losing the night cap, 5-4, in the 10th innings when Andrew Miller walked in the go-ahead run with two outs and the bases loaded on four pitches.

Right-hander Allen Webster, making his major league debut, started the second game and was greeted with a first-pitch double off the wall by Alex Gordon, who scored when the next batter, Alcides Escobar, hit an infield single. Shortstop Pedro Ciriaco threw the ball into the stands behind the Red Sox dugout, allowing Gordon to score. But Webster settled down, retiring the next three batters to end the inning.

Webster went six innings, giving up three runs (two earned), on five hits, including two home runs, and a walk with five strikeouts.

Mark Napoli went 3-for-4 with two RBI, and a run scored, falling a triple shy of the cycle for Boston.

The Red Sox got two runs in the second when Napoli led off against Royals starter Jeremy Guthrie with his third home run of the season. Jarrod Saltalamacchia followed with a walk and scored on Mike Carp’s one-out double. They added a run in the third when Jacoby Ellsbury doubled and scored on Dustin Pedroia’s single.

The Royals tied the score in the fifth on solo home runs by George Kottaras, his first hit of the season, and Alex Gordon, his first home run of the season.

But the Sox went ahead, 4-3, in the bottom of the inning. Napoli’s third hit of the game, a single to center, drove in Nava, who walked and took second on Pedroia’s single.