Philip V, who came to power when Doson died in 221 BC, was the last Macedonian ruler with both the talent and the opportunity to unite Greece and preserve its independence against the "cloud rising in the west": the ever-increasing power of Rome. He was known as "the darling of Hellas". Under his auspices the Peace of Naupactus (217 BC) brought the latest war between Macedon and the Greek leagues (the Social War of 220–217 BC) to an end, and at this time he controlled all of Greece except Athens, Rhodes and Pergamum.