territory and borders, and helped to impose tribute on conquered peoples. Rome's armies had a formidable reputation; but Rome also "produced [its] share of incompetents" and catastrophic defeats. Nevertheless, it was generally the fate of Rome's greatest enemies, such as Pyrrhus and Hannibal, to win early battles but lose the war. Hoplite armies During this period, Roman soldiers seem to have been modelled after those of the Etruscans to the north, who themselves are believed to have copied their style of warfare from the Greeks. Traditionally, the introduction of the phalanx formation into the Roman army is ascribed to the city's penultimate king, Servius Tullius (ruled 578–534). The front rank was composed of the wealthiest citizens, who were able to purchase the best equipment. Each subsequent rank consisted of those with less wealth and poorer equipment than the one before it. The phalanx was effective in large, open spaces, but not on the hilly terrain of the central Italian peninsula. In the 4th century, the Romans replaced it with the more flexible manipular formation. This change is sometimes attributed to Marcus Furius Camillus and placed shortly after the Gallic invasion of 390; more likely, it was copied from Rome's Samnite enemies to the south, following the Second Samnite War (326–304). Manipular legion During this period, an army formation of around 5,000 men (of both heavy and light infantry) was known as a legion. The manipular army was based upon social class, age and military experience. Maniples were units of 120 men each drawn from a single infantry class. They were typically deployed into three discrete lines based on the three heavy infantry types: The first line maniple were the hastati, leather-armoured infantry soldiers who wore a bronze breastplate and a bronze helmet adorned with 3 feathers approximately in height and carried an iron-clad wooden shield. They were armed with a sword and two throwing spears. The second line were the principes. They were armed and armoured in the same manner as the hastati, but wore a lighter coat of mail rather than a solid brass breastplate. The triarii formed the third line. They were the last remnant of the hoplite-style troops in the Roman army. They were armed and armoured like the principes, with the exception that they carried a lighter spear. The three infantry classes may have retained some slight parallel to social divisions within Roman society, but at