معركة مرج دابق
Al-Ghazali was originally the "na'ib" or "viceroy" of Hama under the Mamluk Sultanate of Egypt in the early 16th century. When the Ottomans invaded Mamluk Syria, Janbirdi fought alongside the latter at the Battle of Marj Dabiq in 1516, leading the assault on Ottoman sultan Selim I's army in Gaza. Al-Ghazali was wounded during that confrontation. After the Mamluk defeat, he retreated to Cairo with his army where he took part in the defense of the city from incoming Ottoman forces. The Ottomans again defeated the Mamluks and conquered Egypt and Syria.