Prior to its conquest in the Nine Years War of the 1590s, Ulster was the most Gaelic part of Ireland and the only province that was completely outside English control. The war, of 1594–1603, ended with the surrender of the O'Neill and O'Donnell lords to the English crown, but it was also a hugely costly and humiliating episode for the English government in Ireland. In the short term the war failed, and generous surrender terms given to the rebels re-granted them much of their former land, but under English law.