Gallagher, obtained in the Rich Harden trade with the Chicago Cubs on July 8, 2008, was 1-2 with an 8.16 ERA in six games (two starts) during two stints with Oakland this season. He was optioned to Triple-A Sacramento on April 23 and then again May 19.
A 23-year-old Boston native, Gallagher posted a 1-0 mark and a 1.74 ERA in five starts for Sacramento before being placed on the disabled list June 12 with a strained left knee.
The Padres also received Minor League pitchers Ryan Webb and Craig Italiano in the four-player trade.
Mychael Urban is a national writer for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.