SAN FRANCISCO -- Barry Enright didn't give up many hits.

But the ones the D-backs right-hander did allow went a long way.

The Giants smacked three home runs en route to completing a three-game sweep of the D-backs with a 4-1 win Thursday afternoon at AT&T Park.

It was the final start of the year for Enright, who wound up allowing four runs on five hits in five-plus innings. All four of the runs came via the long ball.

"Enright threw fine today," D-backs interim manager Kirk Gibson said. "He learned a couple of lessons."

With two outs in the second inning, Pablo Sandoval launched a 1-2 pitch into McCovey Cove for a splash hit and a 1-0 San Francisco lead.

"Sandoval, he missed, he was trying to go up and in," Gibson said.

Andres Torres hit a two-out homer of his own in the fifth to push the Giants lead to 2-0.

"The pitch to Torres, it was his third straight first-pitch fastball and he just kind of sequenced himself into that," Gibson said.

Enright (6-7) walked Aubrey Huff to start the sixth and rookie Buster Posey followed with a homer to left-center to end Enright's day.

"Posey, he just made a mistake, he ran out of gas," Gibson said. "Don't weigh too much into some of his struggles recently. This is his first experience going through that, so it will be beneficial to him in the future."

Enright admitted to being on fumes recently. This was his first experience pitching into the month of September and his 192 2/3 combined innings between the Minors and the big leagues are the most he's ever thrown.

"I got a little tired that last inning," Enright said. "Lose focus for one or two batters and that can happen. Whether I'm tired or not, that's me having to grind it out and make sure those pitches in the big situations get to the bottom of the zone. Looking back, I threw pitches to let them get themselves out instead of me get them out and it's disappointing."

What isn't disappointing is the way Enright pitched overall since being called up from Double-A Mobile at the end of June. He breezed through his first 12 starts before hitting a wall and struggling in five of his final six.

"Obviously, I started out a lot stronger and got a little tired towards to the end, but like I've said, these are times you have to get through," Enright said. "It's kind of disappointed me in the last month. Obviously, they were growing pains and there are going to be growing pains as you go through anything. All in all, I'll look back at the positives, I stayed healthy and pretty much had a good season. But always something to work on. Especially this last month, it makes you hungry going into the offseason and make you work that much harder."

The D-backs, who once again struggled to hit with runners in scoring position -- going 0-for-9 in those situations -- pushed across a run in the fourth, when Enright's sacrifice fly brought home Mark Reynolds.

That lack of situational hitting, as well as another dozen strikeouts for a team that already has set a Major League record for them, had Gibson a bit perturbed.

"We scored four runs in three games, No. 1," Gibson said of the series. "We had our opportunities. We struck out four times with men in scoring position. We stuck out with a guy on second base and nobody out, and when you're struggling you've got to execute. That's brutal. We've just missed on our opportunities when they count. We've been way inconsistent on that, that's just something that has to be addressed."

The D-backs, who were 40-41 at home, fell to 24-54 on the road with three games left in Los Angeles this weekend.

"We don't play well on the road," Gibson said. "That has to be addressed. It's brutal."

Madison Bumgarner (7-6) picked up the win for the Giants.