Dewsbury Rams recorded a dramatic 36-34 victory over Toulouse Olympique as centre James Glover slotted over a long range penalty goal after the final hooter had sounded.
A pulsating game saw 13 tries scored and the lead change hands several times, before the Rams secured a sixth straight home win with the last kick of the game.
Toby Adamson dummied his way over for a 78th minute try, which saw Dewsbury draw level at 34-34.
Paul Sykes had chance to win it for the Rams but was off target with the relatively easy conversion attempt and it appeared honours would even.
However, Dewsbury regained possession from the kick off and moments before the full-time hooter sounded, they were awarded a penalty.
Glover stepped up and slotted over the goal from halfway to spark jubilant scenes among his teammates and the Rams supporters.
Dewsbury now just need one point from their remaining six matches to guarantee their Kingstone Press Championship survival and more then likely Neil Kelly’s men remain on course to book a Shield semi-final spot.
Dewsbury struck first as Gareth Moore went close but managed to offload for Jode Sheriffe to score and Sykes landed the first of his five goals.
Toulouse hit back when a break down the right resulted in Paul Marcon crossing for an unconverted try.
Dewsbury extended their advantage when Glover ended a fine attacking move with a try between the posts, which Sykes improved and Moore was only denied a third Rams try by a last ditch tackle following a break by Josh Guzdek.
Toulouse bagged two quick fire tries through scrum-half Stan Robin and winger Kuni Minga, the former converted by Mark Kheirallah.
Dewsbury again hit back as their own French international, Mickael Goudmand stormed over for his first try for the club and Sykes converted to edge the Rams 18-14 ahead at half-time.
Dewsbury extended their lead two minutes after the re-start when Dominic Speakman darted through a gap and over for a try which Sykes again improved.
Toulouse then staged a fightback, started by Gavin Marguerite’s 47th minute try, but fortunately Kheirallah was having an off day with the boot and missed the conversion.
Marcon scooted over for his second try and then completed his hat-trick on the back of some neat play by Robin and Kheirallah converted the latter to edge the French side back in front.
The end to end contest continues as Rams man-of-the-match Robbie Ward forced his way over to the left of the posts and Sykes tagged on the goal.
Bastien Canet scored between the posts at the other end and Kheirallah landed his third goal to put Toulouse 34-30 ahead with eight minutes remaining.
Canstantine Mika was sin-binned for a professional foul and Dewsbury capitalised when Adamson created a gap to gleefully dance over.
Ward and Canet were sin-binned following a dust up after the try but Sykes’ conversion attempt was off the mark and it appeared the spoils would be shared.
But there was a final twist to the breathless encounter when Toulouse conceded a penalty and Glover stepped up to strike over the winning goal.