During the first few days of the war, Egypt and Syria scored astounding victories. Israel was shocked by the attack and was on the verge of defeat. The first Israeli counterattacks failed against both Egypt and Syria. However, Israeli attacks later repelled the Syrian forces and pushed them back further into Syria. The Iraqi army joined the war with Syria and the Israeli army stopped advancing.