An extended Sunday that started with a winning dose of magic concluded with the Royals securing a doubleheader sweep over the Boston Red Sox on a base-loaded walk in the 10th inning.

Not a bad way to end the weekend.

Ervin Santana —“Magic” to his teammates —worked seven strong innings in the afternoon opener for a 4-2 victory before the Royals rallied to win 5-4 in the evening nightcap.

“It was a nice day for all of us,” said Greg Holland, who closed out both victories for saves. “It’s hard to win doubleheaders to begin with.

“And the way the Red Sox were playing ... and being here —it’s tough to play here. To be able to win two games means a lot.”

The last time the Royals swept a doubleheader at Fenway Park was May 31, 1971 — more than a year before the Watergate burglaries that eventually brought down the Nixon Administration.

“These are games that, in my career, I’ve come out on the losing side, the teams I’ve been on, more times than not,” said Jeremy Guthrie, who got a no-decision in the second game.

“It’s tough to play here. It’s a good team. Ervin did a great job in the first (game), and the bats got big hits tonight and the bullpen threw four big scoreless innings.”

The Royals scored the winning run in the second game when Lorenzo Cain drew a bases-loaded, two-out walk on four pitches from Andrew Miller, 0-1, in the 10th inning.

“All I was thinking was ‘swing at a strike,’” Cain said. “That was my main focus. He threw me a first-pitch ball. Then he came with a slider down and in. I took that one. At 2-0, I was taking all the way.

“No chance in (heck) that I’ll be swinging at that 3-0 pitch.”

The Royals forced extra innings on Billy Butler’s game-tying homer in the eighth against Koji Uehara, who had not allowed a run in 22 previous appearances.

“Billy is yet to get on a real roll for us,” manager Ned Yost said. “Like a lot of our guys. But that was a huge home run for us to tie that ballgame off a tough pitcher.”

Santana, 2-1, yielded two runs in the first inning of the opener but nothing more before exiting after the seventh. It was his third straight dominant start — and his third straight that he allowed no runs after the first inning.