The late 17th century saw the final demise of the pike, and its replacement by the bayonet. The plug bayonet, which blocked the muzzle of the musket and needed to be removed for firing, did not catch on. The earliest military use of bayonets was by the French Army in 1647, at Ypres. These were plug-fitted into the barrel. That prevented firing once they were mounted, but allowed musketeers to act as their own pikemen, which gave infantry formations greater firepower. By 1650 some muskets had bayonets fixed to the gun at manufacture, hinged and foldable back along the barrel. French fusiliers adopted the plug bayonet as standard equipment in 1671; English fusiliers followed suit in 1685.
However, in 1669 the socket bayonet was developed, which created no such impediment. It was introduced to the French Army by Sébastien le Prestre de Vauban. By 1689 it was becoming standard issue for French infantry.
The trouble with firing in successive lines was that it was only practical on a narrow front. In open country, the musketeers could easily be flanked, especially by cavalry. In most battles, the musketeers relied on pikemen to protect them while reloading. Infantry practiced various formations and drills that allowed musketeers to hide behind the pikes while reloading and to take up firing positions as soon as their weapons were ready to use. This system worked pretty well, but it obviously cut down the army’s firepower-sometimes by more than half.
The solution to the problem was to turn the musket into a spear. According to some sources, this was the idea of Sebastien le Prestre de Vauban, the great French military engineer in the armies of Louis XIV. It was a solution at least for soldiers. Hunters in France and Spain had for some time been jamming knives into the muzzles of their muskets for protection against dangerous game. It seems that Bayonne, a French city noted for its cutlery, made a type of hunting knife that was favored for this use. When the French army adopted this weapon, it was called a “bayonet.” The earliest reference to the use of the bayonet is in the memoirs of a French officer who wrote that on one campaign, his men did not carry swords, but knives with handles one foot long and blades of the same length. When needed, the knives could be placed in the muzzles of the guns to turn them into spears. The bayonet proved to be a much more effective defense against cavalry than the sword.
There were some drawbacks to these “plug bayonets.” If someone put a plug bayonet in the muzzle of a loaded musket and then fired it, the gun might blow up. This sort of accident seems to have been much more prevalent among civilians who, unlike soldiers, did not load and fire on command. It was so prevalent that in 1660, Louis XIV had to issue a proclamation forbidding the placing of daggers in the muzzles of hunting guns. The trouble with plug bayonets in military guns was that, when the bayonet was in place, the gun could not be loaded or fired, although there were situations when it would be most helpful to be able to do either with the bayonet in place.