What happens when foreign forces retreat from failed wars?