Nicky Ajose scored twice as Bury beat Walsall 2-1 to qualify for the last 16 of the Checkatrade Trophy.
The Shakers striker opened the scoring from 20 yards and headed the winner in at the back post after Erhun Oztumer had side-footed in an equaliser.
Elsewhere, Portsmouth eased past Northampton 2-0 courtesy of goals from Gareth Evans and Stuart O'Keefe.
Evans headed in Conor Chaplin's chipped cross before O'Keefe fired in from a cutback to book a place in the last 16.
Bury's win was Chris Lucketti's first since being appointed manager on 22 November after his first game in charge ended in a 0-0 draw with Northampton.
Ajose could have had a hat-trick, but his rebound from Michael Smith's effort was ruled out for offside.
Defeat by Portsmouth means Jimmy Floyd Hasselbaink's Cobblers are now without a win in five games in all competitions.