Cervantes had had enough of soldiering. He had seen some famous action in Lepanto but much more inaction on marches and in barracks. He was in the best years of his life and now he had made up his mind to go home and become a writer in Madrid.
He and his younger brother both resigned from the army and got on a ship in Naples.
Not long after they set out a storm came up and separated their ship from the others. Pirates spotted it, chased and captured it, and carried the passengers to Algeria to be sold as slaves or ransomed.
Algiers was one of the most prosperous cities in the world then because of the pirates and the slave-trade. It was as populous as Naples or Rome. Cervantes must have despaired as he was led in chains through the city on his way to an abandoned Turkish bath, where there were dozens of other captured Christians. Most were waiting to be auctioned off to Moorish kings or Turkish pashas; a few, the most important men, would be kept for ransom. Cervantes happened to be carrying letters of recommendation which made his captors believe he was a personage of some importance. That saved him and his brother from the auction block. A high ransom was fixed for them and they were treated less harshly.
For the next five years Cervantes lived as a prisoner in Algiers, waiting to be ransomed. His mother and father were not able to come up with the high ransom for him and his brother. Three times Trinitarian friars travelled to Algiers to negotiate with his owner Dalí Mamí, but he would not lower his price. Finally, for all the money the friars offered, Mamí agreed to let Miguel’s brother go—but not Miguel.
He meanwhile tried to escape. One way was to secretly arrange to be picked up by a Spanish ship. The problem, besides the difficulty of contacting a captain who was willing to take the risk, was in getting to the coast. Cervantes actually pulled off a great escape from the baths, along with fourteen other captives. They hid in a cave above the coast for five months (or so a witness claimed ) until they were discovered. The gardener who had aided them and who probably fed them was hanged. Cervantes was put in chains but not for long. No one knows why he wasn’t punished more severely. Perhaps it had to do with his new owner. About this time Dalí Mamí sold him for 500 gold escudos to a pirate-lord named Hassan. Why did Hassan buy him? What did Cervantes have to offer? In any case he kept trying to escape; and every time Hassan re-captured him, though he punished the others “barbarously”, he always seemed to go soft when it came to passing sentence on Miguel.
After moving heaven but not earth Cervantes’ family finally managed to scrape together three hundred of the five hundred escudos Hassan had fixed for his ransom and they pleaded with the Trinitarian friars to try one more time to get him freed. “It won’t work,” said the friars. “Three hundred is not enough. Hassan won’t come down even one maravedí.” But they added on forty-five escudos from a donation and made the trip to Algiers. Cervantes wasn’t the only man they were going to try to free. Hassan wanted five hundred escudos each for two other Spaniards and a thousand for someone named Palafox. There was no way to deal with Hassan—he could see the friars were loaded with cash and he supposed there was more where that came from.
So the friars decided to pay his price, the full five hundred escudos, and rescue at least one man: Miguel de Cervantes.