reason to believe that their exile would not last long, as fortresses and towns changed hands frequently at the time. Many settled nearby in the ruins of Algeciras or around an old hermitage at the head of the bay in the expectation of a prompt return. They took with them the records of the city council including Gibraltar's banner and royal warrant. In time the refugee settlement at the hermitage developed into the town of San Roque. It was regarded by the Spanish, as Philip V put it in 1706, as being the "City of Gibraltar resident in its Campo". A small population of around seventy (mainly neutral Genoese people) stayed behind in Gibraltar. The Grand Alliance's control of Gibraltar was challenged on 24 August when a French fleet entered the Straits. In the subsequent Battle of Vélez-Málaga, both sides sustained heavy crew casualties but lost no ships, enabling each side to claim the engagement as a victory. The French withdrew to Toulon without attempting to assault Gibraltar. In early September a Franco-Spanish army arrived outside Gibraltar and prepared for a siege they commenced on 9 October. Around 7,000 French and Spanish soldiers, aided by refugees from Gibraltar, were pitted against a force of 2,000 defenders consisting of English and Dutch marines and Spanish soldiers and miquelets loyal to Charles. The defenders were aided from late October by a naval squadron under Admiral Sir John Leake. A further 2,200 English and Dutch reinforcements arrived by sea with fresh supplies of food and ammunition in December 1704. With morale falling in the Franco-Spanish camp amid desertions and sickness, Louis XIV despatched Marshal de Tessé to take command in February 1705. A Franco-Spanish assault was beaten back with heavy casualties and on 31 March, de Tessé gave up the siege, complaining of a "want of method and planning". During the War of Spanish Succession, Gibraltar was governed by the British commandant as a possession of Duke Charles of Austria as Charles III of Spain. The British commandant, Major General John Shrimpton, was appointed by Charles as Gibraltar's governor in 1705 on the advice of Queen Anne. The Queen subsequently declared Gibraltar a free port at the insistence of the Sultan of Morocco, though she had no formal authority to do so. Shrimpton was replaced in 1707 by Colonel Roger Elliott, who was replaced in turn by Brigadier Thomas Stanwix in 1711; this