SAN FRANCISCO -- Left-hander Madison Bumgarner lost a perfect game on a leadoff double by Justin Morneau in the eighth inning, but he recovered to complete a one-hit, 13-strikeout shutout as San Francisco beat Colorado.

Buster Posey belted two home runs, including a two-run shot that broke a scoreless tie in the sixth inning, giving Bumgarner all the offensive support he would need to record his second shutout and 15th win of the season.

Left-hander Jorge De La Rosa (13-9) was the hard-luck loser, falling victim to Posey's first home run and a thumb injury.