SAN FRANCISCO (AP) -- Angel Pagan let out a sigh with the rest of AT&T Park when Jay Bruce drifted under his fly ball in right field. As he started to round first base, he lost track of the ball and figured Bruce caught it to send the game to extra innings.
Then the fans roared, which could only mean one thing: game over.
Pagan wound up with a game-ending RBI double that gave the San Francisco Giants a four-game series split with a 4-3 victory over the Cincinnati Reds on Sunday.
''I looked at it and I thought, 'I don't think I have a chance,''' Pagan said. ''I thought he caught it. Then I heard the crowd cheer and I went nuts. It was a weird walk-off.''
Only in San Francisco.
Buster Posey poked a pitch from Jose Arredondo (4-2) down the right-field line that bounced into the stands for a two-out double for his third hit. Then Pablo Sandoval, who was 0 for 4, was walked intentionally to set the stage for a wild finish.
The crowd groaned when Bruce ran under Pagan's fly ball to right until those whipping winds along the bay carried the ball over his head near the 24-foot brick wall as he lost his footing. The 42,039 fans inside sold-out AT&T Park erupted, Pagan tossed his helmet around second and the Giants streamed out of the dugout to mob him in celebration.
''It got in the wind a little bit, but I was just not as close to the wall as I thought I was and missed it,'' Bruce said. ''It's really, really embarrassing. I missed it. It should be an error. It's not, but it definitely should be. I pride myself on my defense and that was just embarrassing.''
Santiago Casilla (2-3) blew the save in the ninth but worked out of a bases-loaded jam with no outs to give San Francisco another shot.
Giants starter Ryan Vogelsong allowed only a two-run homer to Todd Frazier in seven innings. The right-hander struck out five and walked one, and the benches cleared after he slammed his bat because of an inside pitch from Reds starter Bronson Arroyo in the sixth.
After all the drama, the Giants ended the weekend the same way they started it: in first place in the NL West over the rival Dodgers.
''We'll take it,'' Giants manager Bruce Bochy said.
Reds slugger Joey Votto sat out the game with inflammation in his left knee. Miguel Cairo, who replaced Votto in the bottom of the fifth Saturday, started at first base.
Cincinnati could have used the help.
Posey, the NL's top vote-getter for the All-Star team announced earlier in the morning, hit the last of three straight two-out singles in the third to drive in Ryan Theriot and give the Giants a 1-0 lead. Theriot singled, doubled, walked twice and scored San Francisco's first three runs.
Frazier followed with a two-run homer in the fifth that drifted just over the wall in left field to put Cincinnati ahead. Frazier's eighth home run of the season came in place of third baseman Scott Rolen, who was taken out of the lineup with back spasms after Vogelsong took the mound.
After Theriot doubled in front of a diving Bruce in the fifth, he scored on Melky Cabrera's single to tie the game at 2-all. Posey was hit in the left shoulder on an 0-1 pitch next, and though San Francisco's offense stalled with only one out, what appeared to be an unintentional inside pitch wasn't forgotten.
Vogelsong squared to sacrifice bunt in the sixth when Arroyo's inside pitch turned him around, the ball ricocheted off the bat and hit plate umpire Dan Iassogna's shoulder. Vogelgong slammed the bat down and took a couple steps toward Arroyo, the benches cleared and both teams were warned.
Arroyo muttered ''My bad, Vogie,'' Vogelsong said, when the Giants pitcher jogged back to the dugout after he landed a successful sacrifice. Arroyo was booed walking off the mound after going six innings and allowing seven hits, two runs and two walks.
Vogelsong said Arroyo, a teammate and friend from his days in Pittsburgh a decade ago, wasn't intentionally trying to hit him. Arroyo even called Vogelsong in the clubhouse afterward and the two ''cleared the air,'' Vogelsong said, calling his reaction something that happens ''in the heat of the moment.''
All that drama never really materialized into anything tangible.
Reds manager Dusty Baker replaced Arroyo with Logan Ondrusek in the seventh, when Theriot drew a leadoff walk. Cabrera dropped a sacrifice bunt and Posey followed with a line-drive single to center over a drawn-in infield to give San Francisco a 3-2 lead.
Bruce singled off lefty Javier Lopez to open the ninth. Casilla entered and allowed consecutive singles to Ryan Ludwick and Frazier to load the bases.
Cairo, at the time batting .133, hit an RBI single to tie the game at 3-all - although Baker was upset that Ludwick didn't try to score from second, even though third base coach Mark Berry held him up.
''We thought it was in there all the way, but maybe he didn't think it was in there,'' Baker said.
Casilla has blown two of his last three save opportunities, and is 20 for 23 this season in place of closer Brian Wilson. But the hard-throwing right-hander rallied to strike out Ryan Hanigan, Wilson Valdez and got Zack Cozart to pop out to first base, setting the stage for San Francisco in the bottom of the ninth.
NOTES: Rolen was credited with a start batting sixth, and Frazier with a start at third base. Rolen did not get credit for an appearance at third base. ... Vogelsong hit Brandon Phillips with a pitch two outs in the fourth for Cincinnati's first baserunner. Vogelsong has hit four batters in his last five games.
Follow Antonio Gonzalez at: www.twitter.com/agonzalezAP