The Hellenes had obtained a foothold on the coast of Anatolia by siding with rebel coastal Anatolian states against the Hittite Empire. Their position was made more solid by the fall of Troy against a coalition of mainland Greek kings. The coastal cities managed to retain their positions against the subsequent Phrygian invasion of Anatolia by joining with the rump Anatolian states, while the Hittites withdrew into neo-Hittite states in Syria. The coastal cities, now entirely Hellenic, continued to receive immigrants from mainland Greece.