AN 89th-minute moment of madness from Dave Challinor allowed the Blues to claim three points.
The Bury defender tugged Simon Yeo by the shirt as he was about to shoot for goal, leaving referee Kevin Friend with no option but to award a penalty.
Yeo blasted the spot-kick straight down the middle of the goal - and there was no time for Bury to answer back.
The first half had been a turgid affair, with the Blues failing to stamp their authority on a Shakers team visibly low on confidence.
The only bright spot was the performance of debutant Alan Kearney in midfield.
City improved significantly after the break and Roberto Martinez almost scored from two corners. He saw a fierce low drive saved by Andy Warrington and had a header cleared off the line by David Buchanan.
With time ticking away, in stepped Challinor. Star man: Alan Kearney.
Chester: Danby, Linwood, Bolland, Artell, Marples, Martinez, Kearney, Bennett (Wilson 86), Sandwith, Yeo, Steele (Meechan 78). Subs: Cronin, Holroyd, Hessey. Goals: Yeo 90 pen.
Bury: Warrington, Parrish, Challinor, Fitzgerald, Kennedy, Baker, Wroe, Scott, Buchanan, Bishop, Pugh (Hurst 82).
Subs: Woodthorpe, Adams, Speight, Stephens.
Referee: Kevin Friend (Leicestershire).