Grimsby Town guaranteed their Football League safety in dramatic style as an added time winner gave them all three points against Notts County at Blundell Park.
The Mariners produced a magnificent performancee against Kevin Nolan's promotion-chasing side and had looked to be on their way to victory through Nathan Clarke's first-half strike.
There seemed to be a late twist to the tale as the visitors equalised through Dan Jones with only a minute left on the clock but Town were not to be denied and substitute Jamille Matt headed a winner in the third of five added minutes to secure League Two football for next season.
Town began with the same XI that started last week's win at Swindon Town, with goalkeeper James McKeown behind a defence of Reece Hall-Johnson, Clarke, Danny Collins and Andrew Fox.
Harry Clifton, Luke Summerfield, Mitch Rose, Martyn Woolford and JJ Hooper were the midfielders, with Harry Cardwell in attack.
The Grimsby substitutes were Ben Killip, Simeon Jackson, Ben Davies, Matt, Diallang Jaiyesimi, James Berrett and Karleigh Osborne.
Notts boss Nolan also named an unchanged side, meaning experienced strike duo Shola Ameobi and Jonathan Forte would be the ones aiming to cause the biggest problems for the home defence.
Town began brightly, putting pressure on their visitors with early long throws from Rose into the box.
The hosts won the first corner of the game on four minutes and after it was initially played short, Woolford's dangerous cross had to be put over his own bar by defender Nicky Hunt. This time, referee Carl Boyeson spotted a pussh as Summerfield sent the ball frorm the flag towards the near post.
At the other end, a cross from Forte on the left was headed clear by Collins, before Town attacked again and a shot from Fox was blocked.
Another Rose throw into the box was headed out for a corner on the left on nine minutes and from it, the Mariners were inches away from taking the lead. Summerfield played the ball short to Clifton and his 25-yard curling shot bounced back off the frame of the goal.
A sliced clearance from visiting keeper Adam Collin gave Rose another opportunity to use his long throw and this time, the ball was headed down for Hooper but his volley was blocked.
The away side's first real chance came on 19 minutes when a cross from the left was met by Forte but he steered his header just wide of the near post.
Notts' next attack saw them win a corner on the right, which was eventually scrambled clear by the Town defence.
Matthew Virtue was shown the first yllow card of the game on 24 minutes for a foul on Fox but Summerfield's resulting free kick went through to Collin.
The first goal of he game arrived on 28 minutes and it was the Marriners who opened the scoring. A free kick from McKeown just inside his own half was not dealt with by the Notts defence and after the ball landed at the feet of CLARKE, he calmly placed it into the net from 12 yards.
The visitors went in search of an almost instant equaliser but after an appeal for a penalty when Virtue went down was waved away, a shot from Lewis Allessandra was hit over the bar.
Liam Noble tried to catch McKeown off his line with a lob on 34 minutes after Rose had lost possession in mifield but the keeper was able to get back and make a comfortable catch.
More good play by the Mariners then saw them keep the ball down the left before a cross from Fox, which led to Summerfield heading wide.
Town were dominating the game and they had another chance when Clifton set off on a run down the right before squaring for Cardwell, who forced Collin to get down to make a stop.
At the other end, a shot from Forte fell into the path of Virtue but he could not squeeze it into the net at the far post and the ball went out for a goal kick.
Another chance for the hosts then came when a cross fom the right fell for Woolford but he was twice denied, with his first effort blocked before his second was stopped on the line by Collin.
One added minut was signalled as Notts pressed for an equaliser before the break but it was not to come as a Forte header was caught by McKeown in what was the last meaningful action of the half.
Town had produced an excellent first half display and went into the dressing rooms at half-time with a deserved lead.
No changes were made before the restart an after some early Notts pressure, the Mariners had the first real chance of the half when a brilliant run down the left by Hooper took him almost the length of the field but after he pushed the ball past Collin, Cardwell could not get the touch to send it into the net.
Jon Stead replaced Ameobi as the visitors made the first substitution of the game, before Summerfield went on a run into the penalty area fom the right but was unable to get a shot away.
The game stopped briefly for Hall-Johnson to receive treatment after going down with an injury, witht he right-back eventually being replaced by Davies.
Notts made their second change at the same time, sending top sorer Jorge Grant on in place of Virtue.
Woolford was booked for a foul, before a cross from Forte proved just too far ahead of Stead for the striker to make contact with it at the far post.
Town had McKeown to thank for keeping their lead intact when the keeper made a superb save after the ball had ricocheted towards goal from close range on 63 minutes, instinctively reaching out to claw it away fom the top corner of the net.
A volley from Grant flew over the bar as the away side continued to look for an equaliser, before right-back Hunt was replaced by Michael O'Connor in their third and final substitution.
A shot from Allessandra was deflected away for a corner and from it, a flicked header from captain Richard Duffy at the near post was cleared off the line before the rebound cleared the bar for a goal kick.
Town had a chance to make it 2-0 when Hooper's cross from the left was met by Rose but the midfielder could not keep his volley down, instead watching it go over the bar.
Cardwell went off to a standing ovation to be replaced by Matt and the striker's first involvement was to win a free kick, although Summerfield's ball to the far post from it was headed clear.
The Mariners won a corner on the left on 77 minutes but Matt's header went over the bar, before a last-ditch block at the other end kept the score at 1-0 after Grant had rounded McKeown and side-footed towards goal.
Good play by Clifton saw him find Summerfield and the midfielder again ran into the penalty area but could not test Collin.
Dan Jones fired over the bar from 20 yards as Notts threatened again, before Woolford scooped a shot over the bar after good play by Hooper at the other end.
Woolford found Hooper but his hot was pushed away by Collin for a corner as the volume went up around Blundell Park. The corner was cleared and and a long throw soon afterwards went through to keeper Collin.
But with time running out and the Mariners supporters starting to believe their team was heading for all three points, the visitors scrambled an equaliser when with McKeown off his line, a header bounced off the bar and JONES was there to pounce from close range to make t 1-1.
Five added minutes were signalled and Jackson replaced Clifton in the first of them, with the Mariners now needing another goal to guarantee their safety today.
And incredibly, that goal came in the third added minute when a Summerfield corner from the left was met by MATT, who powered a header into the net to spark wild celebrations.
Notts pressed again for a second equaliser but the Mariners held on to secure their most precious three points of the season and ensure they will be playing in League Two again next season.
They will now round off their season with their final game at Forest Green Rovers next Saturday.
1 James McKeown
31 Reece Hall-Johnson
23 Andrew Fox
5 Nathan Clarke (C)
6 Danny Collins
8 Mitch Rose
15 Harry Clifton
19 Luke Summerfield
25 Martyn Woolford
9 JJ Hooper
17 Harry Cardwell
30 Ben Killip
2 Ben Davies
14 Karleigh Osborne
7 James Berrett
20 Diallang Jaiyesimi
39 Simeon Jackson
29 Jamille Matt
1 Adam Collin
19 Nicky Hunt
23 Daniel Jones
5 Richard Duffy (C)
16 Shaun Brisley
4 Elliott Hewitt
6 Matthew Virtue-Thick
18 Liam Noble
7 Lewis Alessandra
14 Jonathan Forte
9 Shola Ameobi
34 Ross Fitzsimons
25 Ben Hall
10 Jorge Grant
21 Noor Husin
8 Michael O'Connor
17 Alan Smith
30 Jon Stead
Attendance: 7,133 (1,566)
Referee: Carl Boyeson