In August, the French were beaten by the Arthur Wellesley at the Battle of Vimeiro and were compelled to leave Portugal. Senyavin's seven ships of the line and one frigate were left face to face with 15 British ships of the line and 10 frigates, in addition to Portuguese coastal artillery. They could have easily annihilated the Russian squadron if Senyavin refused to surrender. The Russian admiral, however, maintained his neutrality, threatening to blow up the ships and set Lisbon ablaze in case of attack. At last, a convention was signed with the British admiral, Sir Charles Cotton, whereby the Russian squadron was to be escorted by the Royal Navy to London without lowering their colors. Moreover, Senyavin was to assume supreme command of the joint Anglo-Russian fleet (as the senior officer of the two), while two Russian ships ("Rafail" and "Yaroslav") were to be left in Lisbon for repairs.