the macedonian phalanx had weaknesses similar to its hoplitic predecessor. theoretically indestructible from the front, its flanks and rear were very vulnerable, and once engaged it may not easily disengage or redeploy to face a threat from those directions. thus, a phalanx facing non-phalangite formations required some sort of protection on its flanks—lighter or at least more mobile infantry, cavalry, etc. this was shown at the battle of magnesia, where, once the seleucid supporting cavalry elements were driven off, the phalanx was static and unable to go on the offensive against its roman opponents (although they continued to resist stoutly and attempted a fighting withdrawal under a hail of roman missiles, until the elephants posted on their flanks panicked and disrupted their formation).