Brandon Belt said he had "a lot of fun" on Opening Night, which means some eager psychology student could get published analyzing the first baseman's idea of "fun."

Then again, winning is always fun, even if the scenes leading up to the happy ending are rated DW - Don't Watch.

In Monday night's 9-8 victory at Chase Field, their first opening triumph since 2010, the Giants butchered the game of baseball for six innings only to rebound from a 7-3 deficit and win on Buster Posey's tie-breaking two-run homer in the ninth against new Diamondbacks closer Addison Reed.

The bottom of the ninth brought more "fun." Miguel Montero hit a leadoff homer against Sergio Romo to make it a one-run game, and Chris Owings reached on a defensive misplay by third baseman Pablo Sandoval, who had several.

But with Owings on second, Romo saved it for Jean Machi (1 2/3 shutout innings) when he struck out pinch-hitter Eric Chavez and retired A.J. Pollock on a high pop to short to end a game in which the Giants were charged with two errors and rightfully could have had five.

"We all had a hand in putting us in a hole, but the offense did a great job coming back," starter Madison Bumgarner said after his first Opening Night outing lasted four innings and yielded four unearned runs.

"It wasn't quite the way I drew it up, but however we get the win, we'll take it."

They got the win when Belt singled with one out in the ninth. Reed struck out Sandoval with three consecutive sliders before Posey lined a 1-0 fastball over the wall in left field.

Posey going deep was one of many good omens for the Giants on a night that started so badly that manager Bruce Bochy turned to bench coach Ron Wotus and asked if the club could start spring training over again.

Arizona's four-run fourth began with consecutive errors by Belt and Sandoval that led to a two-run Gerardo Parra single and two-run Aaron Hill double.

Joaquin Arias' wide throw to second, a questionable decision in the first place, contributed to a two-run fifth off Yusmeiro Petit, and Belt botched a rundown in the sixth to help Arizona extend its lead to 7-3.

"It was a pretty crazy night," Belt said. "Obviously, you want to avoid the mental mistakes out there. It's pretty frustrating."