 Towards the close of the Aetolian War, in 207 BC, while the Greek states were negotiating the terms of peace, and the Eleans were making preparations for the next Olympic festival, Machanidas projected an inroad into the sacred territory of Elis.The design was frustrated by the timely arrival of the king of Macedon in the Peloponnesus, and Machanidas withdrew to Sparta.In 207 BC, after eight months of preparation, Philopoemen, captain-general of the cavalry of the Achaean league, delivered Greece from Machanidas.