a last resortthe person or thing you rely on when everything else has failed
I thought this was a shelter of last resort.