In 200 BC, Rome first became involved in the affairs of Greece, when two of its allies, Pergamum and Rhodes, who had been fighting Philip in the Cretan War, appealed to the Romans for help. In response to this appeal the Romans sent an army to Greece and attacked Macedon. The Second Macedonian War lasted until 196 BC, and it effectively ended when the Romans and their allies, including the Aetolian League, defeated Philip at the Battle of Cynoscephalae. The treaty's terms forced Philip to pay a war indemnity and become a Roman ally while Rome occupied some areas of Greece.