A LATE goal from Shaun Miller earned Morecambe a place in round three of the Johnstone's Paint Trophy.
The half time substitute was in the right place at the right time to slot home Jack Ryan's right wing cross after the on loan front man had got the better of Reece Brown.
The first half saw some decent football from both sides with the action flowing from end to end in the opening stages.
Paul Mullin fired a shot straight at Rob Lainton in the first minute before Bury hit back with Joe Riley flashing a shot wide of the right hand post seconds later.
Lee Molyneux also tested Lainton with a shot from the edge of the edge of the area before Alex Kenyon volleyed well over the bar when the ball fell to him 20 yards out.
Bury always looked sharp going forward with Danny Rose volleying over Riley's right wing cross and Danny Mayor seeing a shot well blocked by Andy Parrish.
Bury continued to threaten with former Port Vale striker Tom Pope heading a left wing cross inches wide before the home side produced their most threatening moment on 44 minutes when Chris Hussey swung in a free kick from the right and Barry Roche was forced into a neat save at his near post.
Bury started the second half brightly with Roche saving neatly from Mayor and Pope heading narrowly wide at the far post.
The Shrimps hit back with Kevin Ellison denied the game's opening goal by a superb point blank save from Lainton who stuck out a leg to make the save.
Ryan Edwards was the Shrimps' hero with a superb goal line clearance from Pope's header before the Shrimps broke with purpose and Miler converted Ryan's cross for a superb winner
Bury: Lainton, Riley (rep Jones 46), Cameron, Brown, Hussey (rep Pugh 46), Hope, Sedgwick (rep Soares 58), Burgess, Mayor, Pope, Rose. Subs not used: Dudley.
Morecambe: Roche, Beeley, Edwards, Parrish, McGowan, Devitt, Goodall, Kenyon, Molyneux (rep Miller 46), Mullin (rep Ryan 78), Ellison. Sub not used: Thompson, Bailey, Bondswell.
Ref: M Brown.