Roman legion
This tactic was known to be used by many ancient armies including the Persian Sparabara, Greek phalanx, and Roman legion, though its origin and spread is unknown. It may have developed independently more than once.