Striker Lee Hughes snatched a dramatic winner as Oldham Athletic made it three victories on the bounce in League One.
Hughes rounded off a flowing move with his second goal of the game and pushed his team back into the play-off places after a topsy-turvy battle.
Visitors Walsall played good football, with Michael Ricketts leading their attack superbly against one of his former clubs.
But Oldham have an impressive scoring record at Boundary Park and their late pressure eventually told as Midlands-born Hughes moved on to a personal tally of nine for the season.
Oldham were on the front foot straightaway as Walsall keeper Rene Gilmartin saved from Andy Liddell and Chris Taylor fired just off-target.
They went ahead when Hughes passed to Taylor, who then fed midfielder Mark Allott for a 20-yard drive which took a deflection to leave Gilmartin wrong-footed.
Walsall soon hit back with two goals in less than three minutes, the first coming when Chris Palmer's corner was met by a close-range Ricketts header at the far post.
Ricketts then played in Alex Nicholls, who ran at the home defence and placed his shot low past Mark Crossley from 12 yards.
Kevin Maher wasted a chance for Oldham before they drew level through Hughes.
His first goal of the night was set up by attacking full-back Daniel Jones, with a cross from the left being neatly dispatched on the volley from ten yards.
There were fewer chances after the break, but Ricketts and Troy Deeney could have scored for Walsall and Darren Byfield and Taylor both went close for Oldham.
On-loan Jones looked to have wasted the final opening after 86 minutes, but there was a twist two minutes later as he charged towards the by-line again.
A brilliant cross was perfect for Hughes, who sealed Oldham's victory by neatly slotting in from the edge of the six-yard box.