Before the end of the war in 401 b.c. , many islands had already transferred their allegiance to the victors , who were led by Philip II of Macedon .
Many islands saw the writing on the wall so they rallied behind the eventual winners .