Advances in firearms technology without the necessary advances in battlefield communications gradually led to the defence again gaining the ascendancy. An example of siege during this time, prolonged during 337 days due to the isolation of the surrounded troops, was the siege of Baler, in which a reduced group of Spanish soldiers was besieged in a small church by the Philippine rebels in the course of the Philippine Revolution and the Spanish–American War, until months after the Treaty of Paris, the end of the conflict.