during his withdrawal to the coast his army was ambushed near beth horon , and only succeeded in making good his escape to antioch by sacrificing the greater part of his army and a large amount of war material .