Ptolemy had just ended a major recruitment and retraining plan with the help of many mercenary generals. His forces consisted of 3,000 Hypaspists under Eurylochus the Magnesian (the Agema), 2,000 peltasts under Socrates the Boeotian, 25,000 Macedonian Phalangites under Andromachus the Aspendian and Ptolemy, the son of Thraseas, and 8,000 Greek mercenaries under Phoxidas the Achaean, and 2,000 Cretan under Cnopias of Allaria and 1,000 Neocretan archers under Philon the Cnossian. He had another 3,000 Libyans under Ammonius the Barcian and 20,000 Egyptians under his chief minister Sosibius trained in the Macedonian way. These Egyptians were trained to fight alongside the Macedonians. Apart from these he also employed 4,000 Thracians and Gauls from Egypt and another 2,000 from Europe under Dionysius the Thracian.