Saladin
The Kurdish sultan who united Egypt and Syria, took Jerusalem back from the crusaders in 1187, and became medieval Europe's favorite enemy.

On 2 October 1187 Saladin took Jerusalem from the crusaders, eighty-eight years after they had taken it and slaughtered most of the people inside. He did not repeat the slaughter. He negotiated a surrender, set ransoms, let those who could pay walk out, freed thousands who could not, and let his own brother buy the freedom of a thousand more. Christian Europe never forgot it, and then spent seven centuries turning the man who had beaten them into a hero.
Salah al-Din Yusuf ibn Ayyub was born around 1137 in Tikrit, in what is now Iraq, into a Kurdish family that served Turkish warlords. He went to Egypt as a junior officer in his uncle's army and reportedly did not want to go. By 1169 he was vizier of the Fatimid caliphate in Cairo, and in 1171 he abolished it, ending two centuries of Shia rule in Egypt and returning the country to Sunni allegiance.
Most of his wars were against other Muslims
This part usually gets left out. When his overlord Nur al-Din died in 1174, Saladin seized Damascus and then spent twelve years fighting other Muslim rulers, mostly the Zengid princes of Aleppo and Mosul, to put Egypt and Syria under one command. Rivals accused him of using holy war as cover for building a family dynasty. He needed that union before he could take on the crusader states, because for ninety years those states had survived by playing Cairo off against Damascus.
The opening came in 1187, when the crusader lord Reynald of Chatillon raided a caravan and broke the truce. Saladin drew the entire crusader field army out of its fortresses and into the dry hills of Galilee in July and destroyed it at the Horns of Hattin. The King of Jerusalem was captured, the relic of the True Cross was taken, and the kingdom had almost nobody left to man its walls. Jerusalem fell three months later, and with it nearly every crusader city except Tyre.
The Third Crusade and the legend
Europe sent three kings to get it back. Frederick Barbarossa drowned on the way. Philip II of France went home early. Richard I of England stayed, retook Acre, beat Saladin at Arsuf, and marched twice to within sight of Jerusalem without attacking, because he knew he could not hold it once his army sailed home. The Treaty of Jaffa in 1192 left Saladin the city and gave Christian pilgrims the right to visit it. He died in Damascus the following March, and by most accounts had given away so much that his treasury could not cover his own funeral.
The European legend began almost immediately. Chroniclers who hated everything he stood for wrote admiringly about his mercy and his word. Dante put him in Limbo with the virtuous pagans rather than in Hell. Walter Scott made him the noble Muslim of The Talisman. Kaiser Wilhelm II visited the tomb in Damascus in 1898 and paid for a new marble sarcophagus, part of his campaign to present Germany as the friend of the Muslim world.
Arab nationalists reclaimed him in the twentieth century. Nasser invoked him, Hafez al-Assad put a statue of him outside the Damascus citadel, and Saddam Hussein, who was also born in Tikrit, had himself painted at his side. Kurds point out, correctly, that the man all those Arab leaders were claiming was Kurdish. Being useful to everybody is its own kind of afterlife.