Rome's wars with Carthage for the Mediterranean territory are referred to as the Punic wars.
Rome's victory was decisive when they defeated the Carthaginians at sea in 241 B.C.E
Carthage had a very powerful navy, but the Romans developed their own navy by copying and improving the Carthaginian ship design.
The second Punic war started 23 years later when the Carthaginians decided to attack Italy itself after it was captured by Rome
In 202 B.C.E., the Carthaginian General Hannibal needed to return home from Italy after the attack to defend Carthage against an attack by a Roman army. There he was defeated in the battle that ended the Second Punic War.