Cesar, escaping persecution by Sylla, Roman dictator, went to Bithynia (a Roman province, now Turkey) where he spent some time hosted by the king Nicomedes. However, upon returning home around 76 BC he was captured, near the Island Pharmacusa http://en.wikipedia.org/wiki/Farmakos, by the Cilician pirates.
Pirates demanded, according to Plutarch, 20 talents for his release. Cesar convinced them that he was worth at least 50 talents. Subsequently, Cesar sent almost all his friends and attendants to close by Asian cities to collect money for his release. He was at last left with only two attendants and one friend (physician) among as Plutarch calls them: "... the most bloodthirsty people in the world.."
For thirty eight days, when in captivity, as Plutarch says:"...with all the freedom in the world.." he was free do what he wanted, writing verses and speeches, exercising and playing games with the pirates.
Finally his ransom arrived and Cesar was free to go. He immediately went to Miletus, the closest Asian (Roman) port (now part of Turkey). There he organized a fleet of ships and went after the pirates, who not expecting this, were easily captured and put to prison. After being dissatisfied with the delay in their punishment by the Roman official in charge of criminal offenses, Cesar personally gave orders to crucify pirates, the punishment he often threatened them when he was in their captivity.