Battle of Shubra Khit

The Battle of Shubra Khit, also known as the Battle of Chobrakit, was the first major engagement of Napoleon's campaign in Egypt that took place on 13 July, 1798. On their march to Cairo, the French army encountered an Ottoman army consisting of Mamluk cavalry and drafted Fellahins under Murad Bey. Napoleon lined his forces up into infantry squares, a tactic which helped repel the Mamluk cavalry, largely due to their inability to penetrate them without suffering severe casualties. A naval battle also occurred, with an Ottoman flotilla being repelled by a French flotilla.
The battle.
Land battle.
To repulse the Mamluk cavalry which advanced upon French positions and heavily outnumbered the French cavalry, Napoleon formed his infantry into rectangles. Formed up out of infantry six to ten ranks deep, the rectangles had a small group of cavalry and baggage in the center, with artillery placed at each corner. For about the first three hours, the Mamelukes circled the rectangles, looking for a place to attack. Then, as the French and Ottoman flotillas met offshore, the Mamluks finally attacked. They were immediately stopped by fire from the French artillery and infantry. The Mamluks regrouped and attacked a different square, but were again stopped by French artillery and infantry fire. 
After about an hour on the defensive, Napoleon ordered his troops in an assault to relieve the French naval flotilla, pushing the Mamluks back to the village of Embabeh, where they later engaged Napoleon at the Battle of the Pyramids. There, Napoleon based his battles plans on the rectangular formations that were used at Shubra Khit.
Naval battle.
The French flotilla, which was commanded by Jean-Baptiste Perrée, consisting of three gunboats and with one xebec and a galley, was attacked by the Mamluk flotilla consisting of seven gunboats, at approximately the same time the Mamluk cavalry charges began. The Mamluk flotilla, with seven gunboats manned by Greek sailors, starting engaging the French flotilla. Within a short while, two gunboats and the galley had to be abandoned by the French due to Ottoman artillery fire, leaving only the xebec and the third gunboat in fighting condition, both of which were laden with civilians and soldiers that had abandoned the other ships. 
These naval vessels remained under attack from the Mamluk flotilla, along with Ottoman small arms fire from the shore. However, a French ship managed to score a hit on the magazine of the Mamluk flagship, which caught fire and blew up, sinking the gunboat. At about this time the Mamluk cavalry were about to charge again, but the explosion, along with the French infantry counter-attacking, sent both the Ottoman flotilla and ground forces into a full retreat.
Aftermath.
With the Ottoman forces routed, Napoleon and his forces continued onwards and won a decisive battle near the Pyramid of Giza.