He sent flowers in a last-ditch effort to keep her from leaving.
of something done as a final recourse (especially to prevent a crisis or disaster); "a last-ditch attempt
A last-ditch action is done only because there are no other ways left to achieve something or to prevent something happening. It is often done without much hope that it will succeed. a last-ditch attempt to prevent civil war. a last-ditch attempt/effort etc a final attempt to achieve something before it is too late