San Francisco, CA (SportsNetwork.com) - Ian Kennedy worked seven solid innings and three different players knocked in a pair of runs, as San Diego snapped out of its offensive funk and ripped San Francisco to the tune of 9-1 in the finale of this three-game set.

Alexi Amarista finished with three hits and two RBI and Jedd Gyorko added two hits, two runs scored and drove in two, while Austin Hedges also plated two for the Padres, who avoided a sweep.

San Diego, which lost 6-0 and 2-0 to open the set, scored for the first time since an 8-6 win to close out a series with the Rockies three days prior.

"We were due. We think we're going to hit and we hit," Padres manager Bud Black said. "Our guys came in with an edge."

Kennedy (2-1) allowed a run on six hits while striking out five and failing to issue a walk.

Brandon Belt doubled and tripled with Nori Aoki driving in the lone run for the Giants, whose five-game win streak and three-game shutout string came to an end.

Chris Heston (2-3) was tagged in the loss for 11 hits and five runs with four strikeouts and three walks over his five-frame outing.

"It was a battle from the start for him," San Francisco manager Bruce Bochy said of Heston. "Every inning it seemed like they had men on base. It was an off day for everybody."

The Giants, who blanked the Angels once and Padres twice during their run of success, saw their streak of stingy defense end in the third inning.

Cory Spangenberg singled and scored when Matt Kemp followed with a double, and after walk to Justin Upton, four straight run-scoring singles -- from Yonder Alonso, Gyorko, Amarista and Hedges -- pushed San Diego's lead to 5-0.

Aoki singled home Matt Duffy in the home half but was tagged out in a rundown to end the inning.

The Padres restored their five-run edge in the seventh, when Kennedy kept the inning alive against Javier Lopez with a two-out single and scored on Wil Myers' triple to right.

In the eighth, San Diego tacked on three more runs courtesy of a Gyorko RBI double, Amarista's fielder's choice grounder and Hedges' sacrifice fly.

Game Notes

Wednesday's burst was San Diego's highest offensive output since torching Colorado for 14 runs on May 1 ... Including the back-to-back shutouts, the Padres have scored 35 runs over their last six games ... San Francisco hadn't surrendered as many runs since dropping a 9-0 decision to Arizona at home on Apr. 17 ... Duffy and Belt accounted for four of the Giants' six hits ... Both clubs are in action on Thursday, as the Padres head to Arizona and the Giants resume their homestand against Miami.