Formal battles were usually preceded by the two armies camping one to seven miles apart (2–12 km) for days or weeks; sometimes forming up in battle order each day. In such circumstances either commander could prevent a battle from occurring, and unless both commanders were willing to at least some degree to give battle, both sides might march off without engaging. Forming up in battle order was a complicated and premeditated affair, which took several hours. Infantry were usually positioned in the centre of the battle line, with light infantry skirmishers to their front and cavalry on each flank. Many battles were decided when one side's infantry force was attacked in the flank or rear and they were partially or wholly enveloped. In 215 BC the two armies established camps about from each other on a plain probably close to Ibera. For several days both simply sent out skirmishers, declining to deploy their main forces. On the same day both armies marched out in force and deployed in battle order.