qnli question: When did Philip form and alliance with Hannibal of Carthage? sentence: In 198 BC, during the Second Macedonian War Philip was decisively defeated at Cynoscephalae by the Roman proconsul Titus Quinctius Flamininus and Macedon lost all its territories in Greece proper.