[citation needed] The Byzantine Empire in the 9th to the 11th centuries used highly sophisticated combined arms tactics, based around hollow infantry square formation.
The infantry square, consisting of pikemen and archers, acted as a base of operations and refuge for cavalry by forming what was essentially a mobile fortified camp.
[5] As used in the Napoleonic Wars, the formation was constituted as a hollow square or sometimes a rectangle, with each side composed of two or more ranks of soldiers armed with single-shot muskets or rifles with fixed bayonets.
Firing too late, with cavalry within 20 m, although more effective in hitting the targets, could result in a fatally wounded horse tumbling into the infantry ranks and creating a gap, thus permitting the surviving horsemen to enter the square and break it up from within.
In suitable terrain astute commanders could manoeuvre squares to mass fire and even trap cavalry, as the French managed against the Ottomans at the Battle of Mount Tabor (1799).
However, if the infantrymen were well-disciplined and held their ground, the cavalryman's dream to "ride a square into red ruin" would not be realized, but such an event was the exception, rather than the rule, in the history of warfare.
A 20 m wide infantry square was a small and difficult target for field artillery firing from within or just in front of its own army's lines, typically at least 600 m away, a range at which most rounds could then be expected to miss.
Other circumstances that could lead to a successful cavalry attack included sudden rainstorms soaking the infantry's gunpowder, effectively reducing their weapons to very short pikes, or a mortally wounded horse in full gallop crashing into the square, opening a gap that could be exploited, as happened at the Battle of Garcia Hernandez, shortly after the Battle of Salamanca (1812).
[citation needed] On 7 February 1857, during the Anglo-Persian War, Indian cavalry successfully attacked and broke a Persian square in the Battle of Khushab.
[citation needed] Rudyard Kipling's poem "Fuzzy-Wuzzy" refers to two battles in the Mahdist War, Tamai in 1884 and Abu Klea in 1885, in which infantry squares were used by the British expeditionary force.
[7] On March 19, 1836, while on the retreat from Goliad after the fall of the Alamo, Texan Colonel James Fannin and his command of 300 men were intercepted by over 1,200 Mexican troops.
[9] Captain George Armes, Company F, 10th Cavalry, was following an the trail of a party of Cheyenne who had killed a group of Union Pacific Railway surveyors.
At the Battle of Nahrin in 1863, several thousand Afghan troops led by 'Abd al-Rahman Khan annihilated a 40,000 strong Qataghani army through the use of the infantry square, which they adopted from Britain.
The square fell out of use in the late 19th century with the advent of modern repeating firearms, which made concentrated formations risky in the face of increased firepower, along with the parallel decline of horse cavalry.