PHOENIX -- To most, Sunday's game between the D-backs and Giants was an ugly one, featuring eight errors.
To the D-backs, though, it was a thing of beauty as they overcame an early six-run deficit to beat the Giants, 7-6, at Chase Field.
The win gave Arizona a sweep in its opening series with its division rival and extended the D-backs' win streak over the Giants to eight games.
"Any time you sweep a team it's special and awesome, but especially against the Giants to continue on the win streak that we finished on last year," said reliever Bryan Shaw, who closed things out in the ninth to record his first professional save.
The win was reminiscent of 2011 when the D-backs led the Majors in come-from-behind wins with 48. Twice last year they overcame six-run deficits, but neither of those comebacks seemed as unlikely as Sunday's.
The D-backs sleepwalked through the first three innings with starter Josh Collmenter getting roughed up and Gold Glove left fielder Gerardo Parra committing an error, one of five on the day for the home team.
It was a continuation of a poor spring by Collmenter as the Giants scored three runs in the second and three more in the third.
The game began to turn in the D-backs' favor in the fourth when long man Wade Miley came on to pitch.
Miley was a surprise addition to the Opening Day roster after D-backs manager Kirk Gibson decided he needed someone in the bullpen who could pitch multiple innings.
The left-hander held the Giants scoreless for the next four innings despite his defense making four errors behind him during that time.
"I just wanted to come in there and keep the game at bay, keep it right where it was at," Miley said. "I knew the offense was going to get going sooner or later, and they did. I just tried to keep it at six runs."
Said catcher Miguel Montero, "He did a great job, an outstanding job. He came in and he was sharp. He made good pitches. I mean, we made a lot of mistakes behind him, but he was able to keep calm and keep making pitches."
Meanwhile, the D-backs' offense kept chipping away against Giants starter Matt Cain. They scored a pair of runs in the fourth on Lyle Overbay's double and three more in the sixth, two of which came on Ryan Roberts' homer and another when Overbay followed with a long ball of his own.
"The thing about these guys is, almost any of them can take you deep," Cain said. "You have to concentrate on making good pitches to all of them. That's tough sometimes."
Overbay did not have an at-bat in the first two games of the season and did not know that he would be starting until he walked into the clubhouse Sunday morning and saw the lineup card.
"Gibby wants us to come prepared and ready to play every day, so that's what I do every day," Overbay said. "I know I'm not going to play every day, but I know I can do something later in the game if needed, so you have to still prepare yourself and come ready to play."
Overbay finished the day 3-for-4 with a pair of doubles, a homer and three RBIs.
"Lyle came up big all day today," Miley said.
The D-backs scored a pair of runs in the seventh as they capitalized on two San Francisco errors to grab their first lead of the game.
"One thing the Diamondbacks did the whole series was, if we made mistakes, they made us pay for it," Giants catcher Buster Posey said.
With setup man David Hernandez and closer J.J. Putz having thrown in each of the first two games, Gibson did not want to use them and instead went with Craig Breslow in the eighth and Shaw in the ninth.
After retiring the first two hitters of the frame, Shaw added some excitement by allowing a single and hitting a batter to put runners at first and second with the Giants' best hitter, Posey, at the plate.
Shaw settled down to strike Posey out on three straight cut fastballs to end the game and seal a most unlikely win.
"That one will make you smile," Gibson said. " It really does; the guys battled. It was an interesting battle and they got the job done."
Steve Gilbert is a reporter for MLB.com. Read his blog, Inside the D-backs, and follow him on Twitter @SteveGilbertMLB. This story was not subject to the approval of Major League Baseball or its clubs.