Coventry City needed two goals in the last 20 minutes to secure their status in League One at the expense of Crawley Town, who are relegated to the fourth tier of English football.
The Sky Blues had the chance to take the lead on the stroke of half time when Marcus Tudgay was brought down by Gavin Tomlin.
However, Nick Proschwitz's penalty was tipped away by the fingertips of keeper Brian Jensen to the delight of the majority inside a sold-out Broadfield Stadium.
The visitors were made to pay for that missed spot kick when Mathias Pogba rose highest from Tomlin's tantalising cross to nod the ball past Lee Burge.
Crawley, who found themselves in the bottom four at the interval, almost doubled their advantage when Izale McLeod unleashed a shot which needed a save low down from Burge.
Coventry, who were slipping dangerously close to the drop zone due to results elsewhere, tried to get back on terms as James Maddison's shot missed the target.
However, the Sky Blues found an equaliser when a pinpoint cross from Jim O'Brien found the head of Tudgay and the forward, back after a month out injured, headed the ball past a helpless Jensen.
City's status in League One was secured when Maddison popped up in injury to give Tony Mowbray's men a priceless victory.
The result, combined with Colchester United's victory over Preston North End, means that Crawley Town will be playing in League Two next season.
No Data Analysis info