The Battle of the Pyramids, also known as the Battle of Embabeh, was a major engagement fought on 21 July 1798, during the French Invasion of Egypt. The battle took place near the village of Embabeh, across the Nile River from Cairo, but was named by Napoleon after the Great Pyramid of Giza visible nearly 9 miles away. After capturing Alexandria and crossing the desert, the French army, led by General Napoleon Bonaparte, scored a decisive victory against the main army of the local Mamluk rulers, wiping out almost the entire Ottoman army located in Egypt. It was the first battle where Bonaparte personally devised and employed the divisional square tactic to great effect. The deployment of the French brigades into these massive rectangular formations repeatedly threw back multiple cavalry charges of the Mamluks. The victory effectively sealed the French conquest of Egypt as Murad Bey salvaged the remnants of his army, chaotically fleeing to Upper Egypt. French casualties amounted to roughly 300, but Ottoman and Mamluk casualties soared into the thousands. Napoleon entered Cairo after the battle and created a new local administration under his supervision. The battle exposed the fundamental military and political decline of the Ottoman Empire throughout the past century, especially compared to the rising power of France. Prelude After landing in Ottoman-controlled Egypt and capturing Alexandria on 2 July 1798, the French army led by General Bonaparte marched down the desert toward Cairo. They met the forces of the ruling Mamluks nine miles (15 kilometres) from the Pyramids and only four miles (6 kilometres) from Cairo. The Mamluk forces were commanded by two Georgian mamluks, Murad Bey and Ibrahim Bey, and had a force of powerful and highly trained cavalry at their command as well as fellahin militia acting as infantry. On 13 July after French scouts located Murad's encampment, Bonaparte ordered an advance toward the enemy's forces, engaging them during the brief battle of Chobrakit. After the destruction of their flagship by French field artillery the Mamluks retreated instead of engaging, the skirmish ending in a minor French victory. Battle On 21 July, after marching all night, the French caught up with the Ottoman force in the vicinity of the village of Embabeh, after one hour rest the men were ordered to get ready for battle. Bonaparte ordered an advance on Murad's army with each of the five divisions of his army organised into