The Padres announced the deal after losing to the Dodgers 7-6 in 13 innings Sunday. The Athletics sent right-handers Ryan Webb and Craig Italiano to San Diego.
Hairston was hitting .299 with 10 home runs and 29 RBIs in 55 games for the Padres.
Italiano, the A's second-round pick in 2005, was 5-6 with a 5.63 ERA for Class A Stockton, and the 6-foot-6 Webb, a fourth-round pick in 2007, was 7-1 with a 4.34 ERA and 39 strikeouts in 45 2/3 innings for Triple-A Sacramento .
Hairston was acquired by San Diego in a July 2007 trade with Arizona. He went hitless in five at-bats with a walk on Sunday.