Ali V Ben Ahmed, nicknamed Ali Khodja, Ali-Meguer, or Ali Loco (the mad) was the dey of the Regency of Algiers from September 1817, just after the assassination of his predecessor Omar Agha the 8th. He remained so until his death in February 1818. His sobriquet Ali-Meguer may indicate his Mingrelian background.
Fearing plots against his rule he at one point had more than 1500 soldiers executed.
A few days after his arrival, and to better ensure her safety, he left the Palace of the Djenina located in the lower part of the city of Casbah and offering small defences, to move to the fortress of the Casbah where he put the treasure safe. He died of the plague in February 28, 1818.