In mainland Greece, Ptolemy IV attempted to rebuild the Ptolemaic influence that had suffered a serious setback under Ptolemy III as a result of the Cleomenean War. In 217 BC, Ptolemy's diplomats helped to broker the Peace of Naupactus which brought an end to the Social War between Antigonid Macedonia and the Aetolian League. He had much less success in his attempts to negotiate a