 On his father's death in 1701, James was recognised by King Louis XIV of France as the rightful heir to the English, Irish and Scottish thrones.Spain, the Papal States, and Modena also recognized him as king of England, Ireland and Scotland and refused to recognise William III, Mary II, or Anne as legitimate sovereigns.As a result of his claiming his father's lost thrones, James was attainted for treason in London on 2 March 1702, and his titles were forfeited under English law.