Pirates continued their raids from one empire to the next at the sunset of the Egyptian empire and the rise of Imperial Rome. That doesn't mean they weren't met with resistance, however, and didn't have setbacks.
In 75 B.C.E., Cilician pirates captured a 25-year-old Julius Caesar, demanding a ransom of 20 talents (1,300 pounds) of silver. Caesar, then a private citizen, claimed the price simply wasn't high enough and insisted the pirates more than double their initial demand, which they happily agreed to.
For 38 days until the sum arrived, Caesar seemed to revel in his time with the pirates, joining in their games, writing poetry and threatening to hang them in what they assumed was a playful and joking fashion, according to Plutarch. Caesar even threatened to have them all crucified. But Caesar wasn't playing. Soon after he was released, Caesar returned with a Roman fleet that overtook the pirates, who were, in fact, crucified.
Several years later, Pompey waged a campaign against the pirates after frequent threats to the grain supply. Ancient Rome attempted to clean up the pirate problem by going directly after pirate strongholds.