Career
He was also the commander of Liwaa Al-Umma, a militant group fighting against the Syrian government in the Syrian civil war. Before the Libyan civil war he was an Arabic teacher in Dublin, where he lived with his Irish-born wife and family. He was described by Volkskrant, a Dutch daily newspaper, as being a face of the Battle of Tripoli and one of the most important rebel commanders of the Libyan civil war.
The Sunday Times, a British newspaper, offered a first-hand account of Al-Mahdi's advance on Tripoli and his men's assault on Gaddafi's former residence, Bab Al-Azizia. He was appointed second in command of the newly formed Tripoli Military Council. The thieves took an important quantity of expensive jewels from the couple's bedroom, as well as 200,000 euros in €500 notes hidden on a hot press.
On 11 October 2011, Al-Harati resigned as deputy head of the Tripoli Military Council, amid tensions over security in the capital. According to the Irish Times, while Al-Harati's associates in Tripoli assured that the resignation was for "personal reasons", a senior NTC official quoted by CNN said that the resignation was because of "differences with the National Transitional Council on the planning of the security of Tripoli". After six months leading Liwaa Al-Umma, Al-Harati left the brigade in September 2012 and handed over its command to the Free Syrian Army.
In 2014, Al-Harati was elected mayor of Libya's capital city of Tripoli.