On 16 June 1779 Spain entered the war on the side of France and as co-belligerents of the rebellious American colonies—the British base at Gibraltar was Spain's primary war aim. The vulnerable Gibraltar garrison under George Augustus Eliott was blockaded from June 1779 to February 1783, initially by the Spanish alone, led by Martín Álvarez de Sotomayor. The blockade proved to be a failure because two relief convoys entered unmolested—the first under Admiral George Rodney in 1780 and the second under Admiral George Darby in 1781—despite the presence of the Spanish fleets. The same year, a major assault was planned by the Spanish, but the Gibraltar garrison sortied in November and destroyed much of the forward batteries.