Treaty of Madrid
The impending war ended Spain's reluctance to accept Portuguese sovereignty; the Anglo-Spanish Treaty of Madrid, signed on 23 May, granted England substantial commercial privileges, in return for help in ending the war with Portugal.