Notts County were beaten 2-1 at Blundell Park as Grimsby Town secured League Two safety.
Dan Jones’ late equaliser looked to have given the Magpies a point but Jamille Matt won the game for the hosts in stoppage time.
Wycombe’s victory at Chesterfield secured them automatic promotion, consigning Notts to the play-offs.
Kevin Nolan named an unchanged starting 11 following last weekend’s 4-1 victory over Yeovil Town, with the only alteration to his squad seeing Jorge Grant replace Terry Hawkridge on the bench.
The hosts started the match the stronger side and came close to the opening goal in odd circumstances on five minutes when one of their players appeared to turn the ball over the bar from point-blank range. The officials instead awarded a corner.
Town kept up their pressure and were unfortunate not to take the lead when Harry Clifton curled the ball on to the post from range.
Notts’ had to wait until the 19th minute for their first glimpse of goal, Jonathan Forte landing a header wide of the post after meeting Dan Jones’ cross.
But the Magpies were on the back foot and, shortly after Matty Virtue had gone into the book for a strong challenge, the hosts had the lead.
Mariners skipper Nathan Clarke grabbed the goal, stroking the ball home in composed fashion following a brief scramble in the area.
Nolan’s men almost conjured up an immediate response. Virtue was appealing for a penalty when he appeared to have been tripped in the area but play continued, presenting Alessandra with a shooting chance. He could only blaze the ball over.
Adam Collin got down low to save from Cardwell moments before Virtue had another appeal waved away when he looked to have been impeded when trying to turn home Forte’s scuffed effort. The referee awarded a goal kick.
Despite Notts’ efforts the half could easily have finished 2-0 to the hosts but for the heroic work of Collin, who produced an excellent close-range save before somehow managing to smother the ball on the line.
The Magpies emerged unchanged for the second half and had a tricky situation to defend shortly after the restart when JJ Hooper embarked on a barnstorming run towards their goal. The forward found his way into the area and it looked ominous for Notts, who were relieved to see his shot roll across the face of goal and wide.
Jon Stead replaced Shola Ameobi and Grant came on for Virtue as Nolan looked to change the course of the game.
And the substitutions certainly seemed to give Notts a lift, who came agonisingly close to an equaliser on 64 minutes when the ball ricocheted goalwards. James McKeown made an incredible save, clawing the ball off the line.
Grant sent a volley over and Michael O’Connor replaced Nicky Hunt in Nolan’s final change.
And there was still time for Notts to turn the match around - they were unfortunate not to get a goal back when Richard Duffy’s glancing header from Grant’s corner somehow stayed out.
It was nearly curtains three minutes later when Mitch Rose latched on to a pinpoint cross but he could only sidefoot the ball over from eight yards.
And Notts nearly made their hosts pay when Grant rounded McKeown only for a defender to slide in and clear his shot off the line.
Nolan’s men were refusing to give up but, when Jones blazed over with nine minutes to go, it was beginning to look like it wouldn’t be the Magpies’ day.
Indeed, it could have been 2-0 late on when Collin was forced to make a strong save from Hooper.
But, in the dying moments of normal time, Notts gave their automatic promotion hopes a lifeline. With a number of bodies forward, O’Connor crashed a header off the crossbar from the edge of the area and Jones was first on the scene to turn the rebound home in front of 1,566 jubilant away fans.
But it was to be the supporters in the home end who would leave Blundell Park the happier as, in the third of five added minutes, Matt headed home the winner to ensure his side will be playing in the EFL next season.
For Notts, the play-offs await.