By May 1815, the war had turned against the Neapolitans and Murat had been driven back to his original headquarters in Ancona. However, the two pursuing Austrian corps under the command of Neipperg and Bianchi had become separated by the Apennine Mountains. Neipperg's force of 15,300 had directly followed the retreating Neapolitans along the Adriatic coast, whilst Bianchi's force of 12,000 had marched on Foligno, in the centre of Italy, to cut of the line of retreat back to Naples. Murat, who now had over 30,000 men in Ancona, hoped to turn and defeat one Austrian corps before the two forces could join together.
Murat decided to send his main force against Bianchi and chose an area around Tolentino, west of Ancona to give battle. He dispatched a division under Carascosa north along the Adriatic coast to hold Neipperg until Bianchi had been defeated. However, following intense manoeuvring and a few small skirmishes, the Neapolitans were in danger of becoming surrounded and retreated in an orderly fashion. This allowed Neipperg to threaten the main Neapolitan force under Joachim Murat engaged at the Battle of Tolentino. This engagement eventually resulted in a decisive victory for the Austrians, and the war soon ended with the Treaty of Casalanza on 20 May.