With the Battle of Trafalgar and the collapse of French hopes of invasion, Cotton took command of several ships stationed off the Tagus in Portugal. After the French invasion of Iberia, Cotton closely supported the Portuguese defences and subsequently the army under Sir Arthur Wellesley which fought at the Battle of Vimeiro. Admiral Cotton, newly promoted, objected to the Convention of Sintra which ended the campaign and refused to acknowledge the provision which allowed the blockaded Russian squadron in Lisbon safe passage back to Russia. Maintaining the blockade over the objections of allies and enemies alike, Cotton eventually forced the Russian admiral to agree to a revision of the treaty in which his ships remained legally Russian but would be held in a disarmed state in a British harbour for the duration of Anglo-Russian hostilities.