The French officer and adventurer Claude-Alexandre de Bonneval (1675–1747) went in the service of Sultan Mahmud I, converted to Islam, and endeavoured to modernize the Ottoman army, creating cannon foundries, powder and musket factories and a military engineering school.