Capture of Gibraltar The Capture of Gibraltar by the forces of the Grand Alliance occurred between 1 – 3 August 1704 during the War of the Spanish Succession . Since the beginning of the war the Alliance had been looking for a harbour in the Iberian Peninsula to control the Strait of Gibraltar and facilitate naval operations against the French fleet in the western Mediterranean Sea . An attempt to seize Cádiz had ended in failure in September 1702 , but following the Alliance fleet ' s success at Vigo Bay in October that year the combined fleets of the ' Maritime Powers ' , the Netherlands and England , had emerged as the dominant naval force in the region . This strength helped persuade King Peter II of Portugal to sever his alliance with France and Bourbon controlled Spain , and ally himself with the Grand Alliance in 1703 . Now with access to the Portuguese port of Lisbon the Alliance fleets could campaign in the Mediterranean , and conduct operations in support of the Austrian Habsburg candidate to the Spanish throne , the Archduke Charles , known to his supporters as Charles III of Spain . Prince George of Hesse - Darmstadt represented the Habsburg cause in the region . In June 1704 the Prince and Admiral George Rooke , commander of the main Grand Alliance fleet , failed to take Barcelona in the name of ' Charles III ' ; Rooke subsequently evaded pressure from his allies to make another attempt on Cádiz . However , in order to compensate for their lack of success the Alliance commanders resolved to capture Gibraltar , a small town on the southern Spanish coast . Following a heavy bombardment the town was invaded by English and Dutch marines and sailors . The governor , Diego de Salinas , and its small garrison on 3 August . Three days later Prince George entered the town with Austrian and Spanish Habsburg troops in the name of Charles III of Spain . However , the Grand Alliance failed in its objective of replacing Philip V with Charles III as King of Spain but in the peace negotiations Gibraltar was ceded to Britain . Background . At the start of the War of the Spanish Succession Portugal was nominally an ally of the Bourbons : France under Louis XIV , and Spain under his grandson , Philip V . Although she was not a belligerent Portugal ' s harbours were closed to the enemies of the Bourbon powers – principally the vessels of England and the Dutch Republic . However , following the Anglo - Dutch naval victory at Vigo Bay in 1702 the balance of naval forces had swung in favour of the Grand Alliance . Having now the ability to cut off Portugal ' s food supplies and trade ( particularly gold from Brazil ) it was not hard for the Allied diplomats to induce King Peter II to sign the Methuen Treaties of May 1703 and join the Alliance . Once Peter II had committed himself to war the Alliance fleets gained access to Portugal ' s harbours , in particular the port of Lisbon . In return for his allegiance Peter II had demanded military and financial aid and territorial concessions in Spain ; he had also asked that the Alliance to send to Lisbon Emperor Leopold I ' s younger son , Charles – the Alliance ' s Habsburg candidate to the Spanish throne – to demonstrate the earnestness of their support . Known to his supporters as Charles III of Spain , the young pretender arrived in Lisbon – via London – with George Rooke ' s fleet on 7 March 1704 , amid great celebrations . Apart from the failed Grand Alliance attempt take Cádiz in 1702 , and the subsequent attack on the Spanish treasure fleet in Vigo Bay , the war had thus far been limited to the Low Countries and Italy . With Portugal ' s change of allegiance , however , the war moved towards Spain . In May 1704 the court at Lisbon received news that French and Spanish troops had crossed the frontier into Portugal . This army of approximately 26 , 000 men under Philip V and the Duke of Berwick scored several victories on the border : Salvaterra fell on 8 May , Penha Garcia on 11 May , Philip V personally oversaw the fall of Castelo Branco on 23 May , and T ' Serclaes captured Portalegre on 8 June . But without supply for their forces , the coming summer heat made it impossible for them to continue with the campaign , and Philip V returned to Madrid on 16 July to a heroes welcome . However , the heat did not affect the war at sea where the Alliance was in a position of strength . Prelude . Using Lisbon as an improvised forward base Admiral Rooke ’ s Anglo - Dutch fleet ventured into the Mediterranean Sea in May 1704 . After seeing the Levant trading fleet safely through the Strait of Gibraltar Rooke headed towards Nice to put himself in touch with Victor Amadeus II , Duke of Savoy . The Grand Alliance had planned for a naval attack upon the French base at Toulon in conjunction with the Savoyard army and the rebels of the Cévennes ; but with Amadeus busy defending his capital Turin from French forces , the Toulon expedition was abandoned and Rooke sailed for the Catalonian capital , Barcelona . Accompanying Rooke was Prince George of Hesse - Darmstadt who had enjoyed popularity amongst the Catalans as their governor at the end of the Nine Years ' War . The Prince was the great exponent of the Barcelona plan ; he had been in touch with the dissidents within Catalonia and counted on the appearance of the fleet to encourage a rising in favour of ' Charles III ' . On 30 May , under cover of the ships ’ guns , Prince George landed with 1 , 200 English and 400 Dutch marines ; but the governor of Barcelona , Don Francisco de Velasco , had managed to keep the city ' s disaffected elements quiet and Philip V ' s partisans on the alert . Moreover , the dissidents were incensed by the size of the Alliance force and had expected the personal appearance of ' Charles III ' . Ultimatums for Velesco to surrender on pain of bombardment were ignored , and the plans for an insurrection from within the city ’ s walls failed to materialize . Rooke , fearing an attack from a French squadron , was impatient for departure . Prince George could do little more than order his local followers – a thousand in all – to disperse to their homes . The marines embarked on 1 June without loss . Meanwhile , the comte de Toulouse , one of Louis XIV ’ s illegitimate sons , was sailing towards the Straits with the fleet from Brest . News from Lisbon of the French manoeuvres reached Rooke on 5 June . Determined to prevent the junction of the Toulon and Brest fleets Rooke decided to risk a battle . However , owing to the foul bottoms of the Anglo - Dutch ships the swifter French fleet escaped Rooke ’ s pursuit and arrived safely in Toulon ; thenceforth , Toulouse became the commander of the enlarged French fleet , now known as the Grand Fleet of France . Rooke could not venture within range of the Toulon forts nor risk attack from a superior force so far away from any port of refuge , he therefore turned back towards the Straits where the arrival of an English squadron under Cloudesley Shovell had put the Allies on a numerical equality with the French . Rooke met Shovell on 27 June off Lagos . Peter II and ‘ Charles III ’ sent word from Lisbon that they now wished another attempt to be made on Cádiz . Methuen believed the place to be ungarrisoned and easy to take , but the admirals in the fleet remained sceptical , especially when considering that they were not on this occasion carrying a force comparable to the failed attempt there two years earlier . Cádiz , however , was not the only potential target . As the Alliance fleet lay off Tetuan on the Barbary Coast , a council of war aboard Rooke ’ s flagship discussed the need to please the two kings and save their own reputations . On 28 July the Alliance commanders considered the proposal of Prince George , now commander - in - chief of Alliance forces in the peninsula , for an attack on Gibraltar . The idea of attacking Gibraltar was old and widely spread . The ‘ Rock ’ had caught the attention of Oliver Cromwell , and later William III ' s and Queen Anne ’ s ministers had marked it for England . The Moors had previously shown interest in the Rock and fortified it with a castle whose ruins still remained . Emperor Charles V had added many other works ; but its immediate operational benefit was negligible . Gibraltar had little trade and its anchorage was unprotected – there was no question , at this time , of basing a fleet there . Battle . The Grand Alliance fleet crossed from Tetuan on 30 July ; by 1 August Rooke , flying his flag in the Second Rate " Royal Katherine " , stood at the entrance to the bay while Admiral George Byng ’ s squadron ( 16 English under Byng and six Dutch ships under Rear Admiral Paulus van der Dussen ) anchored inside , ranging themselves within the line of defences from the Old to the New Mole . The council of war had decided that Prince George would land with 1 , 800 English and Dutch marines on the isthmus under cover of a naval bombardment . The marines landed at the head of the bay , and met with no resistance except for a small body of cavalry . They cut off Gibraltar from the mainland while the enemy on the nearby hills were dispersed by fire from two ships sent to the east of the rock . Prince George summoned the governor , Don Diego de Salinas , to surrender in the name of Charles III . He refused , and the garrison pledged its allegiance to Philip V . Although the governor was determined to resist he knew he did not have the means to do so : his earlier requests for a reinforcements and military stores had always been in vain . By his own account , Don Diego had ‘ no more than fifty - six men of whom there were not thirty in service ’ and could count on a few hundred civilian militia ‘ of such bad quality that before they [ the Allied fleet ] arrived they began to run away . ’ In addition , he had 100 cannon of various kinds but few were in a state to be fired , and fewer still had gunners to fire them . The 2 August passed in preliminaries . Don Diego , who in Trevelyan ’ s words was prepared to ‘ die like a gentleman ’ , sent back his defiant reply to the summons to surrender . Byng ’ s squadron warped themselves in along the sea front as close as the depth permitted and Captain Jumper brought the " Lenox " within actual musket range of the New Mole . These operations were carried out in a dead calm , and were not impeded by a few shots from the Spanish batteries . At midnight Captain Edward Whitaker of the " Dorsetshire " led a party against a French privateer anchored at the Old Mole which had been firing at the marines on the isthmus . About 05 : 00 the following day , 3 August , Byng ’ s squadron of 22 ships fired in earnest on the crumbling walls and forts . Tens of thousands of shells were fired in the attack . The actual damage done was small in proportion to the expenditure of the shot , but in view of the possible approach of the French fleet the job had to be done quickly or not at all . Captain Whitaker acted as Byng ’ s aide - de - camp , carrying his instructions from ship to ship , including the final order to cease firing six hours after they had begun . As the smoke lifted Captain Jumper at the southern end of the line could discern the New Mole and the fort that commanded its abutment on the land . The defenders of the fort appeared to have fled , and Whitaker and Jumper agreed that a landing could be effected there unopposed . Rooke granted the request to attack , and a flotilla of row - boats raced for the New Mole . Landing . As the Grand Alliance prepared for their assault the priests , women , and children who had taken refuge at the chapel of Europa Point at southern end of the peninsula , began to return to their homes in the town . An English ship fired a warning shot in front of the civilian column forcing them back out of harms way , but the shot was mistaken by the rest of the fleet as a signal to resume fire , and the bombardment began again . Under cover of the guns the landing party did its work . The foremost sailors clambered into the breached and undefended fort at the New Mole ; however , by accident or design the magazine at the fort blew up . Some of the landing party carried lighted gun - matches and , according to Trevelyan , had forgotten the possibility of a powder - magazine . Whatever the cause of the explosion the Alliance suffered between 100 – 200 casualties . A momentary panic ensued , for the survivors suspected an enemy - laid trap had caused the disaster . There was a rush for the boats , but at this critical moment Captain Whitaker arrived with reinforcements . The landing was supported by a number of Catalan volunteers , from who one of Gibraltar ' s main spots , Catalan Bay , bears its name . Within a few minutes the attackers had rallied and were proceeding north along the deserted ramparts of the seafront towards Gibraltar . On arriving near Charles V ' s southern wall of the town , Whitaker halted the sailors and hoisted the Union Flag in a bastion on the shore . Byng now came ashore with several hundred more seamen . Thus was the town invested by Byng in the south , as well as on its stronger northern side where the marines had landed with Prince George . Meanwhile , the party of the women and children stranded at Europa Point had been captured by English sailors . Rooke had given orders that the prisoners were not to be ill - treated , but the desire to recover these women was a further inducement for the defenders to end their resistance . Seeing all was lost Don Diego agreed to terms that guaranteed the lives and property of those committed to his care . Under the capitulation French subjects were taken prisoner , while any Spaniard who would take an oath of allegiance to ' Charles III ' as King of Spain could remain in the town with religion and property guaranteed . However , with the exception of a few families the Spanish elected to depart to the mainland , where shortly afterwards they founded the town of San Roque in sight of their ancient home . Aftermath . Most of the inhabitants chose to leave Gibraltar because their priests promised them that it would soon be retaken . They were also persuaded by Alliance looting parties . Rooke remembered the looting at Cádiz but could not prevent a repetition at Gibraltar : the treasures at the Europa shrine were seized and all the churches save one were sacked , besides private houses . The Alliance ' s conduct aroused anger in Spain against the ' heretics ' , and once again the chance of winning over Andalusians to the Imperial cause was lost . Prince George was the first to complain , which was resented by Byng who had led the fighting and who in turn blamed the Prince and his few Spanish or Catalan supporters . Rooke complained in a letter home that the Spaniards were so exasperated against the Alliance that ‘ they use the prisoners they take as barbarously as the Moors ’ . The capture of Gibraltar , however , was recognized as a great achievement in Lisbon and by all the trading interests in the Mediterranean . A month after its capture Secretary of State Sir Charles Hedges described it as ' of great use to us [ the English ] for securing our trade and interrupting the enemy ’ s ' . With the English navy established on the Straits the piratical Moors of the Barbary Coast became reluctant to attack English merchant shipping , and allied themselves with Queen Anne . However , Gibraltar ' s immediate use as a port was limited for it could only take a few ships at a time , and ministers did not think they could keep it unless a garrison could be found for its security . John Methuen recommended an English garrison . This was supplied by the marines that had helped take the place , and by several companies of regular troops . Gibraltar was , therefore , held by English troops and at English cost – but it was in ' Charles III ' s ' name . A year later the Austrian candidate wrote to Queen Anne about " “ Ma ville de Gibraltar ” " . If he had succeeded in his attempt to ascend the throne in Madrid the difficulty of keeping Gibraltar for England would have been politically very great . The Alliance fleet returned to Tetuan to water . Before fresh orders came from Lisbon there was news of the approach of the French Grand Fleet under Toulouse . In an attempt by the French to retake Gibraltar , the one full - dress naval engagement of the war was fought off Málaga on 24 August ; afterwards , French and Spanish troops battered at the land approaches , defended by a small garrison of sailors , soldiers , and marines . These attempts failed , and with the signing of the Treaty of Utrecht in 1713 Britain formally gained control of Gibraltar which remains a British overseas territory .