Abstract: Apparatus comprising a pair of tamping machines mounted in side-by-side disposition on a railway vehicle on a railway track for consolidating ballast supporting the railway track. Each tamping machine comprises two pairs of normally opposed tamping units juxtaposed on a carriage for simultaneous up-and-down motion therewith between a retracted and an operating position. Included in each tamping unit pair is a pair of tamping tools which, while being driven into ballast on opposite sides of a crosstie, are both vibrated and oscillated for compacting the ballast. For use of the machine at a railway switch or over guardrails, a swivelling mechanism comprising an adjusting bolt is provided for pivoting each pair of tamping units about vertical axes and holding the same in desired angular positions with respect to the carriage.