At the morning of 25 September, rebels under Gavril Genov attacked the government troops heading to Ferdinand at Boychinovtsi and defeated them following a bitter fight. The victory raised their morale and they advanced to Vratsa, but were driven back. Rebel forces were also routed at Brusartsi by troops garrisoned at Vidin. The resistance of the rebels in the Petrohan Pass was also broken around the same time, and numerous heavily armed military units advanced to Ferdinand and Berkovitsa. In order to save the rebels from total extermination, the leaders issued an order to retreat to Yugoslavia. On 27 September, the government forces entered Ferdinand. On 28 September and 29 September, there were only occasional fights between the retreating rebels and the army.