Carlos Peguero hit the second of two Royals homers in the fifth inning. (Sarah Glenn/AP)

SCOTTSDALE, Ariz. -- In a manic reversal, the San Francisco Giants staged an eight-run rally in Sunday's sixth inning to secure a 13-9 Cactus League decision over the Kansas City Royals.

Kansas City belted three home runs off Giants starter Tim Lincecum while building a 7-1 lead. A five-run fifth was the big blow, highlighted by Mike Moustakas' RBI single, Jason Donald's three-run homer and Carlos Peguero's homer. The long balls occurred back-to-back.

The Giants launched their comeback innocently as Gregor Blanco drew a walk from Louis Coleman. Brandon Crawford's first spring homer narrowed the difference to 7-3. Pinch-hitter Michael Morse walked, Angel Pagan singled and Brandon Belt singled to generate another run. After Brandon Hicks walked to load the bases, Hector Sanchez blooped a two-run single to right-center field off Aaron Crow. One out later, Blanco tripled home Hicks and Sanchez and scored himself when second baseman Donald dropped a relay throw.

"It got ugly with the big inning they had, but we threw out some great at-bats," Giants manager Bruce Bochy said after his club sustained its comeback against pitchers projected to open the season in the Majors.

Pagan added a two-run single in the seventh to pad the Giants' scoring. The Royals scored two off Derek Law in the eighth, one on a balk and the other on Billy Butler's RBI double. The Giants' Ehire Adrianza got those runs back when he slugged a two-run homer off Greg Holland in the bottom of the inning.

Earlier, rookie right-hander Yordano Ventura helped the Royals establish control by yielding one run and five hits in five innings.

"Yordano was pretty good," said catcher Salvador Perez, who homered to lead off the fourth. "The first two innings he was trying to do too much and was opening his shoulder too quick to home plate. We told him to stay on line and keep the ball down a little bit. I think he didn't feel all that good but he pitched really good."

Lincecum struck out seven, nearly doubling his spring total of four in four outings. He also surrendered a personal spring-high 11 hits in 4 2/3 innings.

Up next: The countdown is on for the Royals -- just three more games in Arizona. Right-hander Jeremy Guthrie, scheduled to start the Kansas City home opener on April 4, will start against the Rockies at 3:05 p.m. CT on Monday at Salt River Fields at Talking Stick. Relievers Tim Collins and Kelvin Herrera also are due to pitch. Left-hander Franklin Morales is the Rockies' probable starter. In a previous Cactus League game, the Rockies hammered the Royals, 10-1, at Surprise.