As a last resort

If everything else fails.

As a last resort we decided to borrow some money to buy the car.