Aaron Hill and Colin Cowgill also had run-scoring hits for the Diamondbacks, who have won six of seven heading into a season-ending series against the Los Angeles Dodgers.
Collmenter (10-10) allowed five hits and two runs for his second win against the Giants this season. Collmenter struck out four and walked one.
J.J. Putz pitched the ninth for his 45th save.
Diamondbacks right fielder Justin Upton was hit on the front of the helmet by Giants starter Tim Lincecum (13-14) in the first. He initially remained in the game and scored Arizona's second run, but left after the inning for precautionary reasons. Neurological tests on Upton were negative and he is listed day to day.
Arizona remained a game behind Milwaukee in an attempt to gain home-field advantage in the first round of the playoffs.
The Diamondbacks took a 2-0 lead against Lincecum in the first. Hill drew a one-out walk and went to second when Upton was hit in the helmet. Both scored when Montero followed with a double into the right-center field gap.
Paul Goldschmidt led off the fourth with a double to right and Cowgill made it 3-0 with a one-out double to right field.
Hill drove in Gerardo Parra on a ground-rule double in the fifth and scored on a ground out for a 5-0 lead.
Lincecum allowed five runs and eight hits with two walks and three strikeouts.
Notes: Giants CChris Stewart
was shaken up when a Lincecum pitch bounced up and hit him on the left cheek in the fifth. Stewart finished the inning, but gave way toHector Sanchez
in the top of the seventh. ... Giants manager Bruce Bochy was ejected by second base umpire Gary Darling in the bottom of the fifth for arguing after Parra stole second. Stewart's throw toJeff Keppinger
easily beat the runner but Darling ruled the second baseman had missed the tag. Replays were inconclusive. ... The Diamondbacks went over 2,000,000 in attendance. Sunday's crowd was announced at 41,423, raising the total for the three-game series to 132,925 and the season to 2,010,340.
READ MORE ON CSNBAYAREA.com