The late Middle Ages has often been seen as the era in which Scottish national identity was initially forged, in opposition to English attempts to annexe the country, led by figures such as Robert the Bruce and William Wallace and as a result of social and cultural changes. English invasions and interference in Scotland have been judged to have created a sense of national unity and a hatred towards England which dominated Scottish foreign policy well into the 15th century, making it extremely difficult for Scottish kings like James III and James IV to pursue policies of peace towards their southern neighbour. In particular the "Declaration of Arbroath" (1320) asserted the ancient distinctiveness of Scotland in the face of English aggression, arguing that it was the role of the king was to defend the independence of the community of Scotland and has been seen as the first "nationalist theory of sovereignty".