A stoppage time penalty sent Grimsby Town to their first defeat in five games as Cheltenham Town snatched all three points at the Jonny-Rocks Stadium.
The Mariners started brightly but fell behind when Ryan Broom opened the scoring just before the half-hour.
Town kept going and after some pressure in the early stages of the second half, they got their reward when Elliot Embleton equalised from close range.
But there was a late twist when the hosts were awarded a spot-kick in the second minute of added time and substitute Conor Thomas converted it to win the game.
Town boss Michael Jolley named an unchanged starting XI after last week’s FA Cup victory at Chesterfield.
James McKeown started in goal, with Luke Hendrie, Harry Davis, Danny Collins and Andrew Fox in defence.
Charles Vernam, Harry Clifton, Jake Hessenthaler and Ben Pringle lined up across the midfield, with Embleton starting just behind Wes Thomas in attack.
The substitutes were John Welsh, Mitch Rose, Jordan Cook, Harry Cardwell, Ahkeem Rose, Alex Whitmore and Sam Russell.
Cheltenham came into the game four places and five points behind the Mariners in the League Two table and were looking for a victory that would take them further away from the bottom two after Notts County lost in the day’s early kick-off.
Their side included ex-Town midfielder Chris Clements, with another former Mariner, Sam Jones, named on the bench.
Hessenthaler had a shot blocked before an effort from Hendrie cleared the bar as Town made a bright start to the game.
Embleton then curled a shot just wide after cutting in from the left on three minutes.
A left-footed strike from Thomas went wide after he had turned inside the box, then McKeown was called into action for the first time on 14 minutes when Luke Varney shot straight at him.
Town won a free kick in a dangerous position when Hendrie was fouled after a cross from Embleton but they were unable to create a chance from it.
The best chance so far fell for Thomas on 23 minutes when he beat home keeper Scott Flinders to the ball following a deep cross from Embleton but sent his header wide.
A Mariners corner came two minutes later and it quickly turned into another one, which was headed off-target by Collins.
The opening goal came just before the half-hour and it was the hosts who took the lead. A quickly-taken throw-in from Ben Tozer found BROOM and he cut inside, went past Vernam and hit a shot which took a deflection and beat McKeown.
Clements fired wide with a low shot on 33 minutes, before a home corner six minutes later eventually led to a good block by Collins from Chris Hussey after the ball had initially been played short.
The home side had another good chance when the ball came to Tyrone Barnett from a long throw but he sent it wide.
Seconds later, there was an opportunity for the Mariners straight from the goal kick when Vernam found himself with a shooting chance but Flinders produced a good save to deny the forward and also saved his rebound.
Cheltenham were looking the more dangerous though and Fox did well to head the ball from a cross out for a corner, which was played short for Jacob Maddox, whose shot was deflected away for another corner. This time, Will Boyle headed wide.
One added minute was played at the end of the half, with the home side retaining their advantage at the interval.
No changes were made before the restart and the hosts had the first chance of the second half, with a cross coming into the box which Hendrie put out for a corner. From the flag, the ball eventually came to Hussey but McKeown saved well.
A spell of Town pressure came around 58 minutes, with crosses going into the Cheltenham box as the visitors looked for an equaliser.
Cheltenham’s Nigel Atangana picked up an injury on the hour and was replaced by Conor Thomas, with Alex Addai replacing Maddox soon afterwards after he was also forced off with an injury.
And it wasn’t long before the Mariners got themselves back on level terms. Thomas did well to create the chance and his left-footed shot from inside the box was deflected through to EMBLETON, who finished from close range.
Town immediately went in search of a second goal and a shot from Clifton was blocked, while another chance saw Flinders save from Thomas.
Embleton curled a shot off-target, before the first Grimsby change saw Cook come on in place of Vernam.
Cheltenham’s Thomas tried a shot on 78 minutes which was cleared by the Town defence, before Pringle and Addai were both booked after an altercation following a foul in Town’s favour.
The resulting free kick eventually led to a Mariners corner but the ball from the flag was headed off-target by Fox.
A corner at the other end on 82 minutes was cleared by Collins, before a good chance for Town was not taken as Pringle’s shot was saved by Flinders after a counter-attack through Embleton.
Another Town corner was cleared, then Cheltenham made their final substitution as Jones replaced Varney.
Addai missed an opportunity to restore the hosts’ advantage, then Pringle made way for Mitch Rose as the game moved into five added minutes.
And a late twist came when Davis was penalised for a foul on Jones inside the box and the referee pointed for a Cheltenham penalty. THOMAS stepped up and gave McKeown no chance as he made it 2-1 from the spot.
Cardwell replaced Clifton in the last substitution of the game, with the visitors now looking likely to be returning empty-handed.
A late free kick gave Town one last chance to grab something from the game but it was not to be, as Embleton’s ball was pushed clear by Flinders. The hosts looked to break and a shot came from Addai from inside his own half after McKeown had come forward to join the attack.
McKeown was booked for a foul in what was the last meaningful action of the game, as the Mariners were left to taste defeat in the league for the first time since November 6.
They are next in action when Swindon Town visit Blundell Park on Saturday.
1 Scott Flinders
15 William Boyle
5 Johnny Mullins (C)
4 Ben Tozer
11 Ryan Broom
3 Chris Hussey
20 Jacob Maddox
26 Chris Clements
6 Nigel Atangana
32 Luke Varney
29 Tyrone Barnett
22 Rhys Lovett
30 Craig Alcock
16 Alex Addai
25 Sam Jones
7 Conor Thomas
10 Liam McAlinden
28 Kelsey Mooney
1 James McKeown
27 Luke Hendrie
19 Andrew Fox
6 Danny Collins (C)
24 Harry Davis
7 Jake Hessenthaler
18 Charles Vernam
22 Elliot Embleton
15 Harry Clifton
30 Ben Pringle
39 Wes Thomas
23 Sam Russell
25 Alex Whitmore
11 Jordan Cook
8 Mitch Rose
4 John Welsh
17 Harry Cardwell
21 Ahkeem Rose
Attendance: 2,775 (292)
Referee: Paul Marsden
Next Up: Swindon Town (H)