Jamie McGuire opened the scoring on 39 minutes, when his dipping volley was too much for Stanley ‘keeper, and his former team-mate, Scott Davies.
However, the hosts got back on level terms early in the second half when Seamus Conneely beat Lenny Pidgeley, who had done extremely well just seconds earlier to keep out a header from livewire Josh Windass.
Stanley then turned things around on 72 minutes when Terry Gornell got the better of Martin Riley, who pulled up with a hamstring injury, and retained his composure to slot past Pidgeley and make it 2-1.
The game will at least be remembered by Corbin Shires, who came on for his senior debut with a quarter-of-an-hour remaining.
Manager Adam Murray made four changes to his starting line-up. Martin Riley returned in place of the suspended Ritchie Sutton in the heart of defence, whilst a change in midfield saw the experienced Jamie McGuire come in for Joe Fitzpatrick. Reggie Lambe and Vadaine Oliver were the preferred options in attack, replacing Rakish Bingham and Matt Rhead respectively.
The visitors had the better of the opening exchanges and looked threatening when midfielder Jack Thomas had his fierce shot from 20 yards out blocked by a Stanley defender.
The hosts’ first opening came when right-back Sean Maguire burst down the touchline and teed up a cross for striker Terry Gornell who couldn’t guide his header on target.
Two minutes later, the Stags came close when Oliver skilfully flicked the ball into the path of the on-rushing Lambe, who attempted a lob that cleared Accrington goalkeeper Scott Davies, but also the crossbar, landing on top of the net.
Winger Junior Brown took inspiration from the attacking flurry and tried his luck with an ambitious 25-yard curling effort but was unable to find the target, shooting wide of the left post.
Thomas did well to test Davies from an acute angle in the 21st minute when his shot from the right side of the penalty area, 25 yards out, forced the Accrington ‘keeper into a save.
The half-hour mark passed by and the match was desperately in need of a spark as both sides tussled for possession in midfield, looking to make the breakthrough.
The Stags were a whisker away from opening the scoring in the 34th minute when Callum Elder played his 50-yard free-kick into the penalty area, which was almost flicked into the back of the net off the head of the advanced defender Riley.
Murray’s men found the breakthrough they were after six minutes from the break when an attempted ball forward from Brown deflected fortuitously into the path of defensive midfielder McGuire who finished clinically past Davies from 18 yards out.
Stanley came their closest to evening things up when Josh Windass’ corner found the head of Dean Winnard, whose goal-bound header was cleared off the line by Thomas. This would be the last action of the first half as the visitors went into the break one goal to the good.
However, just two minutes into the second half Stanley drew level after a good attacking move resulted in Windass getting a powerful header on target that was parried by Lenny Pidgeley into the path of the unmarked Seamus Conneely who blasted the ball into the net.
The chances flew thick and fast for both teams with midfielder Chris Clements coming close at the other end before Gornell fired over the crossbar from long-range.
Adam Murray made his first substation in the 52nd minute, introducing striker Rhead in place of Brown, in-turn altering the make-up of his attacking formation.
The home side looked to find an opening once again when the ball trickled through to Windass who looked the finish as Pidgeley closed down the angle, but defender Ryan Tafazolli was there to clear the danger.
John Coleman’s men continued to assert their dominance as Tafazolli was called into action again moments later when his perfectly timed challenge on the edge of the penalty area denied Stanley another chance to test Pidgeley as the match quickly turned into a lively affair.
A change at the back was required on the hour mark when Lee Beevers entered the fray in place of Tafazolli.
A further opportunity came the way of the home side in the 66th minute via a free-kick just on the edge of the penalty area. The ever-prominent Windass stepped up to strike the ball venomously and sent it narrowly over the crossbar, despite heavy claims by the home side that the ball had been handled in the Mansfield wall.
Stanley took the lead in the 71st minute when Gornell found space on the left-wing and was able to got away from Riley, who went down under injury. The Stanley striker used the side of his boot to finish calmly past Pidgeley to make the scoreline 2-1.
Riley was unable to continue was replaced by 17-year-old Corbin Shires in the centre of defence.
As the pressure continued to be applied on Mansfield, Liam Marsden became the first player to go into the notebook of referee Chris Foy as he dragged Windass back on the edge of the penalty area.
Tempers flared slightly in the 80th minute when Oliver attracted the ire of the referee and was cautioned for a late challenge on goalkeeper Davies.
Stanley captain Luke Joyce became the first Accrington player to be cautioned when, in the 84thminute, he was shown a yellow card for breaking up a positive Mansfield attack led by Lambe.
As the match neared its conclusion, the Stags had a last gasp chance to take something away from the match when Clements’ low shot was cleared off the line. Moments later, Oliver thought that he had found the equaliser when he found the ball at his feet and guided his lobbed effort over Davies, only to be adjudged to be offside.
The home side did well to keep the Stags at arms length in the second half and ultimately managed to hold onto their slender lead with the scoreline finishing 2-1.
Attendance: 1,921 (537 away supporters).