SAN FRANCISCO (AP) -- Giants pitcher Madison Bumgarner wanted to waste a two-strike curveball in front of Rockies cleanup hitter Justin Morneau.
He left the ball up just enough for Morneau to get a piece of it - the only mistake on an otherwise memorable night for the San Francisco left-hander.
Bumgarner pitched a one-hitter and matched his career high of 13 strikeouts, and the Giants beat the Rockies 3-0 on Tuesday night to snap a three-game losing streak.
The two-time All-Star retired the first 21 batters before Morneau doubled down the right field line to end the bid for perfection. That was the only baserunner Bumgarner (15-9) gave up. He fanned the next three hitters.
''I was going to try to bounce a curveball,'' Bumgarner said. ''I think it would have probably bounced if he (wouldn't have) hit it. He's a good hitter and he was in there being aggressive. He happened to hit it pretty good. No regrets on throwing it.''
San Francisco's husky left-hander was attempting to follow Tim Lincecum's no-hitter at AT&T Park on June 25 against San Diego with another milestone for a sellout crowd of 41,050 on a pristine Bay Area evening.
His 103-pitch gem kept the Giants in a wild-card spot.
Matt Cain is the last Giants pitcher to throw a perfect game, on June 13, 2012.
''That game was probably more impressive than a lot of no-hitters, that's how well he threw tonight,'' San Francisco manager Bruce Bochy said. ''You look at the strikeouts, his stuff, the command ... it was a very, very impressive evening for him.''
Buster Posey homered twice for San Francisco.
The hapless Rockies came close to breaking up Bumgarner's bid for perfection in the top of the fifth. Matt McBride was thrown out by shortstop Brandon Crawford on a close play at first base. Colorado manager Walt Weiss came out to dispute the call but did not ask for a replay after getting a signal from his dugout.
Drew Stubbs hit a deep fly to left in the first, but Gregor Blanco made the catch near the wall.
Colorado didn't come close to getting a hit otherwise.
''It's unfortunate we had to lose,'' Morneau said. ''It was a pitcher's duel and they found a way to score some runs and we didn't.''
It's Bumgarner's third career shutout and sixth complete game. He also became the first pitcher in franchise history with six games of 10-plus strikeouts with no walks.
The Giants didn't do much offensively either until Posey's two-run home run in the sixth chased Rockies starter Jorge De La Rosa. Hunter Pence drew a leadoff walk before Posey smashed a 3-1 pitch into the stands in left-center.
Posey also homered in the eighth off reliever Brooks Brown. It's the second multi-homer game of Posey's career.
De La Rosa (13-9) struck out five and walked two in five-plus innings before leaving with a bruised left thumb he hurt while batting.
''He was cruising,'' Weiss said. ''We've seen him hurt that thumb before and he's pitched through it a lot. It was hurting pretty good.''
Rockies: C Wilin Rosario missed his fourth straight game with a sore wrist. Rosario has done some light hitting in the cage, but the team has not ruled out placing him on the disabled list.
Giants: Team officials were still awaiting word on backup catcher Hector Sanchez, who flew to Pittsburgh on Monday to meet with a concussion specialist.
Rockies: LHP Franklin Morales (5-7) pitches the series finale and is making his second start since a two-inning relief appearance against Cincinnati on Aug. 17.
Giants: RHP Tim Hudson (9-9) has a 4.35 ERA in 13 career starts against Colorado.