A late try from Simon Webster lifted Edinburgh to their first European Cup win from four attempts with a 24-22 victory over Castres at an empty Murrayfield stadium on Monday.
The match had been postponed for 24 hours because of snow and ice, leading to it being played behind closed doors.
The victory allows Edinburgh to move off the bottom of the table ahead of Cardiff, but second-placed Castres no longer have their destiny in their hands in a Pool 1, which is led by Northampton.
The French side will need to win their next game against Cardiff and if possible gain bonus points and then beat Northampton at home in the final group match.
The Scottish side took a 14-10 halftime lead after Tim Visser scored a first-half try and set up another for Lee Jones.
Although, Greig Laidlaw’s sin-binning midway through the second half was followed by a Castres penalty try and another score for Sebastien Tillous-Borde, leaving Edinburgh trailing by five points with four minutes remaining.
However, for the second week running Webster came off the replacements’ bench to score a try and this time it was not in vain as David Blair kicked the conversion for the hosts to triumph.
Rodrigo Ortega scored a first-half try for the visitors, for whom Pierre Bernard kicked three points and Seremaia Baikeinuku two conversions.