The Macedonian wars were a series of conflicts fought by Rome in the eastern Mediterranean, the Adriatic, and the Aegean. They resulted in Roman control or influence over the eastern Mediterranean basin, in addition to their hegemony in the western Mediterranean after the Punic wars.
During the Second Punic War, Philip V of Macedon allied himself with Hannibal. Fearing possible reinforcement of Hannibal by Macedon, Rome dispatched forces across the Adriatic. Roman legions (aided by allies from the Aetolian League and Pergamon after 211 BC) did little more than skirmish with Macedonian forces and seize minor territory along the Adriatic coastline in order to "combat piracy". Rome's interest was not in conquest, but in keeping Macedon, the Greek city-states, and political leagues carefully divided and non-threatening. The war ended indecisively in 205 BC with the Treaty of Phoenice. While a minor conflict, it opened the way for Roman military intervention in Greece.
In 201 BC, ambassadors from Pergamon and Rhodes brought evidence before the Roman Senate that Philip V of Macedon and Antiochus III of the Seleucid Empire had signed a non-aggression pact. Although some scholars view this "secret treaty" as a fabrication by Pergamon and Rhodes, it resulted in Rome launching the second Macedonian war, with aid from its Greek allies. It was an indecisive conflict until the Roman victory at the Battle of Cynoscephalae in 197 BC. After Rome imposed the Treaty of Tempea, Philip V was forbidden to interfere with affairs outside his borders, a condition he adhered to for the rest of his life. In 196 BC Rome declared Greece "free", and withdrew completely from the Balkans. It seemed that Rome had no further interest in the region.