beat a retreat

verb
RareNot in standard dictionaries
1

To leave hastily in the face of opposition.

#informal