Brandon Belt hit a game-ending single to left-center with one out in the ninth, Buster Posey tied it with a two-run homer in the eighth, and the San Francisco Giants rallied to beat the Arizona Diamondbacks 5-4 on Monday night for their seventh straight home victory.
Posey's drive to straightaway center was his second homer of the year and in two days.
Belt's first career game-winning hit came against Tony Sipp (1-1), who allowed a leadoff single to Andres Torres. Brandon Crawford sacrificed him to second.
Jose Mijares struck out two in the ninth before surrendering Cliff Pennington's double. Closer Sergio Romo (1-1) relieved in a double switch as Belt entered at first base. Romo retired pinch-hitter Eric Hinske on a first-pitch grounder.