Fetching details from the dictionary...
to tuck one's tail between one's legs; to admit defeat; to turn tail (and run)