Marquis (4-5) struck out eight and walked one in notching his third win in three starts.
Huston Street tossed 1 1/3 innings of scoreless ball for his 17th save as the Padres avoided a three-game sweep at the hands of the Giants.
Guzman (3-for-4, three runs scored) unloaded a two-run blast with the Padres leading 3-1 in the fifth to break the game open, and added a solo shot in the eighth to cap the Padres' scoring.
Chase Headley contributed a bases-empty home run for San Diego.
Giants starter Tim Lincecum (4-11) struck out eight over 4 2/3 frames surrendered five runs on seven hits and three walks to take the loss.
Ryan Theriot and Melky Cabrera each drove in a run for National League West-leading San Francisco.
Wisconsin business offering 'therapeutic cuddling' forced to close
Exploding whale video goes viral on Internet