Ben Gordon struck an 83rd minute winner to give Alloa an away win against fellow promotion hopefuls Forfar.
The visitors went ahead in the seventh minute thanks to Ryan McCord's penalty, after Derek Soutar upended Robert Thomson inside the area.
A minute later, Danny Denholm found the top corner with a header to level the scores.
Defender Jason Marr restored the Wasps' advantage with his first goal for the club, nodding Mark Docherty's corner into the net after 22 minutes.
Eleven minutes from time, Denholm brought the Loons back level for the second time with a fine left-footed effort, his fifth goal of the campaign.
But Paul Hartley's men were not to be denied, and five minutes later Docherty again provided the service from a right-wing corner allowing Gordon to give the away side all three points.
Soutar, McCulloch, Faeroe, Tulloch, Motion, Ross Campbell, Fotheringham, Templeman (King 82), Kader (Iain Campbell 65), Swankie, Denholm (Sellars 90). Subs Not Used: Scott, Duncan Reid.
Templeman, Fotheringham, Motion.
Denholm 8, 79.
Bain, James Doyle (Ross McCord 86), Gordon, Marr,Meggatt, Simmons, Docherty, Ryan McCord, Holmes, Thomson (Grehan 62), Megginson (Fearns 72). Subs Not Used: Craig McDowall, Cawley.
Ryan McCord 7 pen, Marr 22, Gordon 83.