Updated

Trevor Cahill took a no-hitter into the seventh inning on Wednesday and the Arizona Diamondbacks topped the San Francisco Giants, 6-2, in the finale of a three-game series at AT&T Park.

Cahill (10-11) was charged with two runs on two hits and a pair of walks with five strikeouts over 6 1/3 innings to earn his first win since July 30.

"Your adrenaline starts getting up and I was trying to maybe do too much at the end and just kind of got a little bit tired," Cahill said, referring to his early success.

Chris Johnson clubbed a two-run double, while Aaron Hill, Paul Goldschmidt, Miguel Montero and John McDonald all knocked in a run for the Diamondbacks, who have won back-to-back games on the heels of a three-game slide.

Brandon Belt smoked a two-run single for the Giants, who have lost two straight after winning three in a row. Madison Bumgarner (14-10) was saddled with his third straight loss after allowing four runs on seven hits and two walks with five strikeouts over 6 1/3 innings.

The Diamondbacks jumped out front with a run in their first at-bat when Adam Eaton singled to begin the game and came around to cross the plate later in the inning via a base hit by Montero.

Johnson smoked a triple into the right-center field gap with one out in the fourth and scored on a single by McDonald to stretch the lead to 2-0.

The D-backs broke the game open with four runs in the seventh. Eaton started the rally with a one-out infield single and scored when Hill ripped a double into the left-center field gap. Goldschmidt drove home Hill two batters later with a base hit and Johnson capped the inning with a two-run double down the right field line, making it a 6-0 game.

San Francisco finally got on the board with a pair of runs in the home seventh. Scutaro ended Cahill's no-hit bid with a single into right leading off the inning. Buster Posey beat out an infield hit and Hunter Pence walked to load the bases.

Cahill was removed for Mike Zagurski, who allowed a two-run single to Belt, pulling the Giants within 6-2.

Facing Matt Lindstrom, Scutaro slapped his second hit of the night into center field leading off the ninth inning, but Lindstrom fanned Pablo Sandoval, Posey and Pence to secure the win.

"The game wasn't very pretty for us tonight," Giants manager Bruce Bochy said. "Their guy pitched pretty well. The two-out hits killed us."

Game Notes

San Francisco fell to 7-7 in rubber games this season, and have lost six of their last eight such contests ... The Giants have allowed 13-or-more hits in three consecutive games for the first time since the 2009 season ... San Francisco fell to 38-30 at home, and have lost 14 of their last 21 contests at AT&T ... San Francisco begins a three-game set against the Los Angeles Dodgers, while Arizona will begin a three-game set in San Diego on Friday.