A 70-metre try from wing Nick Scott with the last action of the match gave London Welsh an unlikely but crucial 16-9 win over Bath.
Scott picked off Stephen Donald's telegraphed pass and had sufficient pace to hold off the cover for the match-winning try, which Gordon Ross converted.
It was the only try in a desperately poor game and a draw would have been a fair result as neither side played well enough to deserve a win.
Bath had the better scoring opportunities but though they went close on a number of occasions, they failed to take them. They had the more inventive backs but their scrum was continually under pressure.
Ross also kicked a penalty with Gavin Henson adding six points for the Exiles while Donald booted all of Bath's points.