Early Han armies comprised large numbers of foot soldiers armed with halberds and bows, protected by cavalry. Their expeditions penetrated deep into Central Asia, Korea, and Vietnam during the 2nd and 1st centuries BC. Nevertheless, they were vulnerable to attack from mounted archers of the nomadic Xiongnu in the northwest. Learning from their adversaries, they soon developed a cavalry capable of swift raids. An adequate supply of horses was crucial, but remained problematic. They acquired their best horses from pastures controlled by their nomadic enemies. Iron weaponry and armour gave China an edge in battle and the crossbow, which the Chinese almost certainly invented, was tantamount to a secret weapon. Later, the secret passed into enemy hands. By the 1st century AD, knowledge of the crossbow had reached Rome.