Simon Finnigan's late try, converted by Paul Deacon, gave Bradford Bulls a narrow 20-18 win over Catalans Dragons in France.
Shontayne Hape and Glenn Morrison also scored tries for the West Yorkshire side, with Alex Chan, Clint Greenshields and Thomas Bosc crossing for the hosts.
It gave Bradford only their second win in five games this season, while the French side are one of four teams propping up the table with only one success.
The Bulls' night was tarnished somewhat as four players limped off through injury.
Catalans thought they had won it when Bosc's 75th minute touchdown put them ahead for the first time in the game.
But Finnigan backed up a James Evans break to snatch it at the death with Deacon holding his nerve.
Jamie Langley bowed out with a groin strain on 20 minutes and he was joined by back-row colleagues Glenn Morrison and Chris Nero in the second half and finally full-back Michael Platt.
But Steve McNamara, who dropped Iestyn Harris for the first time in his career, saw his men battle on for the much-needed success.
The hosts applied most of the pressure in the first half but came away with just a solitary score after some excellent Bradford defence.
Michael Platt denied Bosc and Clint Greenshields with gutsy last-ditch tackles when tries seemed certain and the full-back also nailed Adam Mogg after the ex-Queensland star had intercepted to race clear.
It was the visitors who got off the mark first after six minutes after Paul Deacon's delicate chip deceived Catalans full-back Greenshields.
Morrison picked up and neatly side-stepped Dimitri Pelo before sprinting to the posts from 30 metres out.
Deacon converted but Greenshields made up for his mistake by scoring after 28 minutes. Bosc's reverse kick bounced awkwardly and retreating Hape dallied leaving the Catalans man to mop up.
A Deacon penalty put Bradford ahead on 45 minutes and he converted when Hape crossed just after the hour mark.
Catalans had Pelo sin-binned for a professional foul but rallied back through tries from Chan and Bosc and looked set for only their second win before the Bulls came good at the end.