Most of the army of Jerusalem marched north with Philip, Raymond III, and Bohemond III to attack Hama, and Saladin took the opportunity to invade the kingdom. Baldwin proved to be an effective and energetic king as well as being a brilliant military commander: he defeated Saladin at the Battle of Montgisard in September 1177 despite being greatly outnumbered and having to rely on a levee-en-masse. Although Baldwin's presence despite his illness was inspirational, direct military decisions were actually made by Raynald.