Bastia defiantly hauled themselves clear of the Ligue 1 relegation zone as they snatched victory from Lorient despite playing almost the entire match a man short.
Anthony Modeste went from hero to villain as he opened the scoring on 11 minutes only to see red moments later.
The striker was perhaps unlucky to be dismissed, after he dived in on Kevin Monnet-Paquet, but Bastia looked set to be punished nonetheless when Lamine Kone levelled on the half-hour.
But rather than roll over the Corsicans immediately grabbed back the lead through Wahbi Khazri before holding the visitors at bay for an hour to move three points clear of the drop zone.
Khazri had already forced Fabien Audard into a smart save before Modeste grabbed the opener following a swift counter-attack. Julian Palmieri set the on-loan Bordeaux striker through and he beat Audard with a cool finish.
There was nothing composed about Modeste a minute later as he went in recklessly on Monnet-Paquet and was sent off.
Lorient took until the half-hour to get level when Kone rose highest to nod in Alain Traore's free-kick - but three minutes later they were behind again.
Audard's weak clearance was emphatically capitalised on by Khazri as he swooped on the loose ball before smashing in a low drive from outside the area.
Bastia could even have had a third before half-time when Palmieri's long pass released Sambou Yatabare but he could not beat Audard.
Lorient's expected surge in the second 45 minutes never truly materialised despite Jeremie Aliadiere shooting just wide after the restart.
Instead, Bastia continued to threaten on the break with Audard reacting to save from Florian Thauvin, who also hit the post after some poor defending late on.
Home goalkeeper Landry Bonnefoi still needed to make a vital save in the closing stages as he kept out Aliadiere's 30-yard screamer at full stretch.