Updated

Mike Moustakas drove in three runs during a late-game offensive surge and James Shields overcame a shaky first inning to get the win against his former club, as the Kansas City Royals beat the Tampa Bay Rays, 8-2, in the opener of a three-game series at Kauffman Stadium.

Moustakas highlighted a four-run sixth inning with his first homer of the season and sparked a three-run seventh with a sacrifice fly.

Lorenzo Cain, Salvador Perez and Jeff Francoeur each had two hits and knocked in a run for the Royals, who snapped a two-game losing skid and have won four of six overall.

Dealt by the Rays to the Royals in December, Shields (2-2) tossed seven innings and retired the final 13 batters he faced. He gave up a two-run homer to Matt Joyce in the opening frame before settling down to allow just two hits over his final six innings.

"It was a lot of fun facing that team. There's a lot of good memories over there," Shields said.

Kansas City was held off the board through the first 5 2/3 innings by Tampa Bay starter Alex Cobb (3-2).

The Royals mustered only four hits -- all singles -- against Cobb before stringing together six straight two-out hits to chase the right-hander.

Eric Hosmer doubled and scored on a base hit by Cain. Moustakas followed with a drive over the right-field wall to put Kansas City up 3-2. Perez then singled home Francoeur, who had doubled.

After Elliot Johnson singled, Jamey Wright retired Alex Gordon on a grounder to second.

The Royals loaded the bases in the seventh and Moustakas plated Alcides Escobar with a fly ball to right. Cain then stole second and an errant throw by catcher Jose Molina allowed Hosmer to score. Francoeur made it 7-2 with a triple to right.

Billy Butler added a sac fly in the eighth for Kansas City's final run.

Desmond Jennings singled to begin the game and Joyce followed with a blast to right-center field. Evan Longoria then drew a one-out walk and James Loney doubled, but Shields, who pitched for Tampa Bay from 2006-12, fanned both Yunel Escobar and Luke Scott to avoid further damage.

"He's very good, he's young and he's a great competitor," Rays manager Joe Maddon said of Shields. "He's going to pitch very well here."

Game Notes

Shields is the Rays' all-time leaders in wins (87), games started (217), innings pitched (1,454 2/3) and strikeouts (1,250) ... The Rays tied the team record for consecutive games with a homer at 15 ... Loney had three of Tampa Bay's eight hits ... The Rays activated Scott from the 15-day disabled list prior to the game, and he made his season debut Tuesday, going 0-for-4, after being sidelined with a right calf strain. To make room for Scott on the roster, the club designated outfielder Shelley Duncan for assignment.