To withdraw means to leave a place, usually during war.
After losing the battle, the enemy withdrew back to its own country.
Example picture