A pike is a pole weapon, a very long thrusting spear used two-handed and used extensively by infantry both for attacks on enemy foot soldiers and as a counter-measure against cavalry assaults. Unlike many similar weapons, the pike is not intended to be thrown. Pikes were used by European troops from the early Middle Ages until around 1700, wielded by foot soldiers (Pikemen) deployed in close order. Whilst the soldiers using such spears may not have called them "pikes" per se, their tactical employment of these weapons ran along broadly similar lines.After the mid-seventeenth century, armies that adopted the flintlock musket began to abandon the pike altogether, or to greatly decrease their numbers. The invention of the bayonet provided an anti-cavalry solution, and the musket's firepower was now so deadly that combat was often decided by shooting alone. A common end date for the use of the pike in infantry formations is 1700, although such armies as the Prussian and Austrian had already abandoned the pike by that date, whereas others such as the Swedish and the Russian continued to use it for several decades afterward – the Swedes of King Charles XII in particular using it to great effect until the 1720s.