PHILADELPHIA -- The rain and the score were ruining the Hawaiian-themed afternoon for 39,293 fans Sunday, until Shane Victorino gave them something to cheer about.

Victorino was the appropriate hero -- and why not? He and his Hawaiian heritage had been celebrated all day. There was the Victorino Hula Figurines that were handed out before the game. Hula dancers donned grass skirts and Hawaiian-print shirts, and native music was piped in between innings.

So when Victorino came up with the score tied and one out in the bottom of the ninth, there was the feeling that everyone was expecting the same result. As soon as the shot left Victorino's bat, a knowing roar went up from Citizens Bank Park.

Giants left fielder Mike Sweeney trotted back but could only watch the ball fall into the seats. Victorino pumped his fist twice, then kept it raised as Philadelphia moved closer to a series victory against San Francisco with the 9-8 win.

"It couldn't have happened at a better time," said Victorino, whose neck was hidden by numerous leis. "It's just weird how it worked."

The Phillies, at 28-28, have reached the .500 mark for the seventh time this season.

Ryan Howard had temporarily given the Phillies the lead with a dramatic three-run homer in the seventh inning that seemed like it might stand as the game-winner. But relievers Ryan Madson and Antonio Alfonseca gave up an RBI base hit in the ninth inning as the Giants tied it.

Victorino was just supposed to win it.

"It was Hula Day," Greg Dobbs said. "What do you expect?"

It was probably better that way. Victorino had been disappointed until his final at-bat, going 0-for-3. He came close to sending one out in the seventh, but it fell short, into the mitt of center fielder Randy Winn.

Victorino found a fastball he liked in the ninth from Kevin Correia, but was late getting around on it. Victorino said after the game that it was only his second opposite-field home run as a professional, with the first coming when he was a member of the Class A Wilmington Waves of the South Atlantic League.

"I mean, look at me," Victorino said, poking fun at a frame not ideal for power.

"He's got some pop," said Rowand, who went 3-for-4 from the seventh spot, with a home run. "He had some near-misses his previous at-bats."

There was plenty to laugh about when the game was over, but for a while, the Phillies' chances were as cloudy as the sky around Philadelphia.

Freddy Garcia followed up his longest outing of the season with a poor effort, giving up six runs over 5 1/3 innings. He gave up a leadoff home run to Winn to start the game, and served up another to Bengie Molina to start the second.

"I'm concerned, because he pitched out of jams and he gets caught up in big innings," said manager Charlie Manuel of Garcia's 98-pitch outing. "Once he got down at the bottom of their lineup, I wanted to put the lefty on those left-handed hitters."

Southpaw Michael Zagurski relieved Garcia and didn't allow an earned run despite a comical moment where the ball slipped from his hand as he tried to throw to first. The Giants scored three runs in the fifth and two more in the sixth to lead 7-5.

Howard's three-run blast to center field ricocheted off the wall behind the shrubbery. The reigning National League MVP is hitting .297 with four homers since returning from the disabled list.

"That's what he's supposed to do," Jimmy Rollins said. "The crowd stood up and cheered, and he delivered."

Madson, who hit for himself in the bottom of the eighth to come out again for the ninth, walked two consecutive Giants batters. Kevin Frandsen then singled off Alfonseca, driving in the tying run.

Madson had gotten a key out in the eighth inning. With a runner on and the Giants down a run, Barry Bonds pinch-hit. The right-hander got Bonds to foul off a couple pitches before grounding into a fielder's choice to end the inning. Manuel let Madson hit for himself in the bottom of the inning, hoping he could close the game against three left-handers.

"That was the most intense [at-bat] so far," Madson said of his Bonds confrontation. "I made a couple of good pitches to him and he laid off, and I finally got him on that last fastball. I wish I could have gotten two more outs [after retiring Winn in the ninth]."

He wasn't able to finish, but everything turned out all right, thanks to Victorino.

"It was overcast, we got down early by a lot," Howard said. "We just said, 'Man, we got to find a way to win this game.'"

Victorino was more than happy to provide a solution. Despite the gloom from the rain and the early deficit, there was still a party atmosphere brought on by the Hula theme. Even actor Danny DeVito, in town to promote his show, "It's Always Sunny in Philadelphia," danced on top of the home dugout.

"As the game went on, I really felt how the whole day was circled around me and my Hawaiian culture," Victorino said.

The game-ending homer was his first.

Aloha 'oe (farewell to you).