Jimmy Ryan`s hat-trick sealed a play-off spot for Accrington and left Barnet needing victory on the final day of the season to have any chance of preserving their six-year stay in the Football League.
The Bees battled hard for their League Two survival at the Crown Ground but a 3-1 defeat leaves them two points adrift of Lincoln - the only side still within reach.
Meanwhile, Stanley, guaranteed fifth place, can look forward to their play-off semis and will be dreaming of an Old Trafford final.
In Stanley's first real attack after four minutes, midfielder Ryan made space for himself and unleashed a 25-yard strike which nestled into the bottom corner.
However, the Reds only held onto their lead for three minutes. Jack Midson played a ball into the area, the Stanley defence failed to clear and Mark Marshall pounced and tucked the ball into the far corner of Alex Cisak's goal.
The visitors upped the pace after the break as they forced a succession of corners but it was Stanley, unbeaten in 11 at home prior to the clash, who regained the lead against the run of play in the 56th minute.
Ryan's 20-yard free-kick taking a deflection off the Barnet wall and wrong-footing keeper Sam Walker.
Barnet continued to press - with nine corners in the opening 20 second-half minutes - but again Ryan broke their hearts shortly after the hour.
The former Shrewsbury man got the ball on the edge of the area and Walker was only able to get his fingertips to the ball and help it into the bottom corner.
Copyright (c) PA Sport 2009, All Rights Reserved.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: http://gms.to/writeforgms