Here's why:
* Preposition: The word "to" is a preposition.
* Object: The noun phrase "flee the country" is the object of the preposition "to".
* Function: The entire phrase "to flee the country" acts as an adverbial phrase, modifying the verb "caused". It tells us why the people fled.