Miguel Montero countered with a solo blast off Sergio Romo in the home half to pull the Diamondbacks within a run. Romo, though, stranded a runner on second to seal the win.

Brandon Belt went 3-for-5 with a solo homer and three runs scored and Angel Pagan finished with two hits and two RBI for the Giants, who saw starter Madison Bumgarner surrender four unearned runs on six hits over four innings.

Jean Machi (1-0) picked up the win after working 1 2/3 scoreless innings.

Gerardo Parra drove in three runs, while Mark Trumbo and Aaron Hill finished with two RBI apiece for the Diamondbacks, who fell to 0-3 on the season. Arizona had opened its regular season on March 22 in Australia against the Dodgers. They were swept in the brief two-game set.

Brandon McCarthy started for the D-backs and surrendered five runs on six hits over 6 2/3 innings. Addison Reed (0-1) was pegged with the loss after surrendering Posey's go-ahead blast in the ninth.

United Press International is a leading provider of news, photos and information to millions of readers around the globe via UPI.com and its licensing services.

With a history of reliable reporting dating back to 1907, today's UPI is a credible source for the most important stories of the day, continually updated - a one-stop site for U.S. and world news, as well as entertainment, trends, science, health and stunning photography. UPI also provides insightful reports on key topics of geopolitical importance, including energy and security.

A Spanish version of the site reaches millions of readers in Latin America and beyond.

UPI was founded in 1907 by E.W. Scripps as the United Press (UP). It became known as UPI after a merger with the International News Service in 1958, which was founded in 1909 by William Randolph Hearst. Today, UPI is owned by News World Communications.