The Lombards arrived in Italy in 568, quickly overrunning the Roman province that had recently been reconquered at immense cost. In 584 the remaining Roman territories were organised into the semi-independent Exarchate of Ravenna, which fought the Lombards for decades over control of the border regions.
In 637, angered at Heraclius' religious reforms, the then exarch, Isaac, declared independence from Constantinople. With the support of the Pope and the African exarch he announced the restoration of the Western Empire, with himself as emperor. Heraclius, distracted by a simultaneous civil war and a war with Persia, was unable to respond, though the withdrawal of Italian and African troops badly weakened his rival's position.
Isaac recalled the existing Italian and African legions, raised taxes so that he could levy more troops, and relocated several Berber tribes to Campania to serve as foederati. Having raised a formidible army, in 638 he attacked Langobardia Minor and reduced the surviving southern Lombards to serfdom.
King Rothari, whose centre of power lay in the north in Langobardia Major, gathered his warriors and marched on Ravenna. He was however intercepted and defeated at the Battle of Forli in September, and the survivors were again beaten at Senigallia in November. Both sides retired for the winter, which Rothari spent trying his best to rebuild an army from boys and retired veterans.
In 640 the Lombards made one last attempt to salvage a victory. After several skirmishes at the beginning of the year, the Lombard and Roman armies finally met on the east bank of the River Ticino, not far from the Lombard's capital of Pavia.
The Lombards were utterly defeated. King Rothari was killed in the battle, as were many of the remaining nobles and great lords, and their lands were incorporated into Roman territory once more.
Many surviving Lombards fled north to the Frankish realms, while others were assimilated over time into Roman culture. Either way, the Lombards would never again trouble Italy.