SAN FRANCISCO -- Tim Hudson's first start at home as a 40-year-old turned out to be a memorable one, but not because of the calendar.
The veteran right-hander became just the 15th active pitcher to record a win against all 30 major league teams Sunday, beating the Oakland Athletics for the first time in his career in the San Francisco Giants' 4-3 victory.
"It is nice to have finally beaten them," Hudson said of the club that drafted him 18 years ago and for whom he played his first six big-league seasons. "I've had a long career. That's pretty much what it boils down to."
The Giants' ninth win in 12 interleague games completed a three-game sweep of the rival A's, who have not won since Thursday's trade of left-hander Scott Kazmir.
"We couldn't get that one last run again," said A's manager Bob Melvin, whose team fell to a major-league-worst 10-24 in one-run games.
Third baseman Matt Duffy smacked a two-run home run and catcher Buster Posey went 4-for-4, leading the Giants to the 11th win in their last 12 games.
San Francisco has won six in a row at home to improve to 54-44, a season-high-tying 10 games over .500. The Giants now trail the first-place Los Angeles Dodgers by just one game in the National League West.
"Good series for us," said Giants manager Bruce Bochy. "It's always good to get a sweep. A lot has to go well."
Hudson (6-8), who spent nine seasons with the Atlanta Braves between leaving the A's and joining the Giants in 2014, was staked to 3-0 and 4-1 leads, then staggered through five innings, allowing three runs on seven hits.
Hudson struck out one and did not walk a batter in recording his 220th career win, his first since turning 40 on July 14.
"That's quite a big deal, really," Bochy said of beating every team in a career. "It tells you about him. His stuff. His longevity. He checked his box off."
Duffy's home run came in the bottom of the first inning off A's right-hander Kendall Graveman (6-7). It was his ninth of the season and scored center fielder Angel Pagan, who had walked, ahead of him.
The Giants added a third run in the first when first baseman Brandon Belt singled in Posey, who had singled, and batted around in the inning.
"Anytime a pitcher can hit in the first inning," Hudson noted, "that's usually good for him."
The A's got one run back in the top of the second on a wild pitch by Hudson that scored right fielder Josh Reddick. But the Giants countered that with one of their own in the bottom of the inning, with Duffy making it a three-RBI day with a single that again scored Pagan.
Graveman was pulled one batter later, having allowed four runs on seven hits in 1 1/3 innings, the shortest outing of his season. He walked two and struck out two.
"It was one of those days they did a good job of hitting," Graveman said. "I have to find ways to get outs. I'll continue to work and find out how to get better."
Four Oakland relievers combined to shut out the Giants on five hits from there. The group included left-hander Drew Pomeranz, who had been listed as the team's scheduled starter Wednesday against the Los Angeles Dodgers.
The A's got within 4-3 with a two-run fourth off Hudson. A single by left fielder Ben Zobrist and double by first baseman Ike Davis set up RBI singles by third baseman Brett Lawrie and pinch-hitter Billy Butler.
Four Giants relievers protected the one-run lead after Hudson's exit, with closer Santiago Casilla surviving a walk and a single in the ninth to record his 26th save.
The Giants appeared to catch a break when pinch-hitter Jake Smolinski, who had walked to open the inning, got caught trying to steal third base with one out.
"We had a little miscommunication on the sign," Melvin claimed.
Duffy, Belt and shortstop Brandon Crawford had two hits apiece for the Giants, who out-hit the A's 12-9 en route to their seventh series sweep of the season.
Zobrist, Davis and Lawrie collected two hits each for the A's, who fell to 5-5 in interleague play with their fourth consecutive loss.
NOTES: The Giants recorded their first sweep of the A's since May 20-22, 2011. ... A's manager Bob Melvin announced after the game that RHP Jesse Chavez would replace LHP Drew Pomeranz as Wednesday's starter in Los Angeles. Pomeranz was called upon for two innings of relief Sunday. ... On Randy Johnson's induction day at the Hall of Fame, Melvin proudly boasted of having 18 career hits against the left-hander. In fact, it was 14. Still, his .452 (14-for-31) career average against Johnson matches the best among all players who faced him 30 or more times, tying 1B Albert Pujols' mark. ... Melvin also found time before the game to announce that OF Coco Crisp (cervical strain) would begin a four-game, injury-rehab assignment at Class A Stockton on Monday. ... Giants manager Bruce Bochy announced that LF Nori Aoki (broken right leg) has completed a four-game, injury-rehab stay at Triple-A Sacramento and will rejoin the parent club in time for Monday's series opener against the Milwaukee Brewers.