The Athletics broke a 1-1 tie with their big fifth inning, during which they drove Arizona starter Josh Collmenter from the mound.
Stephen Drew had an RBI single for the Diamondbacks in the sixth and Kelly Johnson hit a two-run homer in the eighth to bring Arizona within one.
Andrew Bailey came on to shut down the Diamondbacks in the ninth for his seventh save, protecting what turned out to be the first win of the season for Rich Harden.
Harden made his 2011 debut after opening the season on the 60-day disabled list with a muscle strain in his throwing arm. He gave up two runs on four hits and struck out six over six innings. Harden was limited to 76 pitches.
Collmenter (4-5) surrendered all five runs in 4 2/3 innings.
Wisconsin business offering 'therapeutic cuddling' forced to close
Reindeer recovered after escaping from Santa during lighting ceremony