SAN DIEGO — All-Star Buster Posey drove in a season-high five runs and Chad Gaudin and three relievers combined on a five-hitter, leading the San Francisco Giants to a 10-1 victory against the San Diego Padres on Friday night.

Posey's two-run double highlighted San Francisco's five-run seventh inning, when Padres manager Bud Black was ejected for arguing an obstruction call during a rundown.

Marco Scutaro and Brandon Crawford had three hits apiece while Gregor Blanco scored four runs for the Giants, who won consecutive games for the first time since they beat San Diego June 18-19 at San Francisco. Coming in, the defending World Series champions had lost 16 of 20.

The Padres lost for the 17th time in 20 games and dropped a season-high 12 games under .500.

Black was ejected by second base umpire Laz Diaz for arguing after Kensuke Tanaka was awarded third base on an obstruction call against third baseman Chase Headley. Tanaka was on the infield grass when he and Headley collided.

The Giants led 5-1 going into the seventh, when Brad Brach allowed five runs on five hits and a walk. Because of the obstruction call, four of the five runs were unearned. Scutaro and pinch hitter Andres Torres had RBI singles and another run scored on a wild pitch.

Posey also had a sacrifice fly in the third and a two-run single in the sixth.

Gaudin (3-1) improved to 3-0 with a 2.70 ERA in six starts since joining the rotation on June 2. He allowed one run and three hits, struck out five and walked four in five-plus innings.

The Padres were trailing 5-1 when they chased Gaudin by loading the bases on a single and consecutive walks. But left-hander Jose Mijares came on and retired the side on eight pitches.

Sean O'Sullivan (0-1) lost his debut with his hometown Padres. He threw 102 pitches in five innings, allowing two runs and six hits. He also doubled leading off the third.

O'Sullivan, who graduated from Valhalla High in suburban El Cajon in 2005, signed a minor league deal in December.

NOTES: The Padres made several moves before the game, including moving LHP Clayton Richard to the 60-day DL and announcing he will have season-ending surgery on his pitching shoulder. Also, 1B Yonder Alonso and 2B Jedd Gyorko were activated from the 15-day DL, INF-OF Kyle Blanks was placed on the 15-day DL with left Achilles tendinitis, RHP Miles Mikolas was optioned to Triple-A Tucson and SS Pedro Ciriaco was designated for assignment. ... The four-game series continues Saturday night when Giants RHP Tim Lincecum (4-9, 4.61 ERA) faces RHP Edinson Volquez (6-7, 5.33 ERA).