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. Along with the Battle of the Nile, this battle was part of a great global rivalry between France and Britain; the French objective was to establish a base from which to continue its campaign against British India. After the French fleet was destroyed by Horatio Nelson at the Battle of the Nile, Bonaparte marched through the Levant until his advance was stalled by Anglo-Turkish forces at Acre. 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.