In wider European terms, it was a part of the Anglo-Spanish war that ran from 1585 to 1604. Ó Néill enlisted the help of lords throughout Ireland, yet his most significant international support came from the Spanish, whose king, Philip III of Spain, sent an invasion force, only to see it surrender after a winter siege at the Battle of Kinsale in 1601. Outside Kinsale, Ó Néill's own army was defeated. In early 1603 the war ended, and thereafter crown authority was gradually established throughout Ireland. Ó Néill and his allies were treated relatively generously, considering the cost of the rebellion, and were regranted their titles and most of their lands. Unable to live with more restrictive conditions, they left Ireland in 1607 in the Flight of the Earls, their lands in Ulster were confiscated, and thereafter great numbers from all over Britain were encouraged to move there in the Plantation of Ulster.