Up until the rise of the Roman Republic, the Greek phalanx was considered the dominant form of military tactics. Evolution had simply favoured longer and longer spears: by the time of NAME_1, phalanxes often carried polearms that rivalled a pike in length.

The Kings of Rome appeared to have gone with this prevailing trend. By the time of the early Republic, however, things had changed. Although not the well-organised Legionnaires of popular imagination, the Hastatii, Principes and Triarii of this era tended to favour stabbings swords over spears.

This was the army that was able to secure the basis of the Roman Empire, including a defeat of Macedonia and other states belonging to NAME_1's successors which, presumably, were still putting pike phalanxes in the field.

One thing that has never been clear to me is how and why this new military model developed, and whether it was instrumental in defeating Rome's enemies. So:

Why did Roman soldiers start to favour swords and maniples over the traditional spear phalanx?
Was this new method of waging war a significant factor in their success, or was it more a case of other factors such as good discipline and organisation compared with the relatively chaotic and fragmented post-NAME_1 world?
If so, why did the sword-armed Roman armies enjoy such an advantage over the phalanx?