Thousands of people struggled to board the last trains out of the capital city, forcing families to separate and leave loved ones behind.