Siege of Badajoz ( 1658 ) The 4th Siege of Badajoz took place from July to October 1658 during the Portuguese Restoration War . It was an attempt by a huge Portuguese army under the command of Joanne Mendes de Vasconcelos , governor of Alentejo , to capture the Spanish city of Badajoz , which was the headquarters of the Spanish Army of Extremadura . The fortifications of Badajoz were essentially medieval and considered vulnerable by the Portuguese , and had already been attacked by them three times during this war . So in 1658 , Mendes de Vasconcelos gathered an army at Elvas and advanced on Badajoz . The city was poorly defended and the Spanish troops under the command of Francisco de Tuttavilla , Duke of San Germán , looked principally to their own survival until a Spanish relief expedition could be mounted . The Portuguese forces launched a direct assault on the town , hoping initially to capture a key fort , San Cristóbal , but after 22 days of unsuccessful attack , the Portuguese abandoned this plan and began to build a circumvallation wall around Badajoz instead , to try to isolate the city . These plans received a boost when they captured a large Spanish defensive installation outside Badajoz , the Fort of San Miguel , but were unable to use this platform successfully against Badajoz itself . The siege lasted for four months , during which time one - third of the Portuguese troops either died ( mainly from the plague ) or deserted . The arrival of a relief army , under King Philip IV of Spain ' s favorite don Luis de Haro in October , lifted the siege . Mendes de Vasconcelos , the Portuguese commander , was stripped of his rank and imprisoned for his failure . Taking advantage of this failure , D . Luis de Haro , invaded Portugal and besieged Elvas , the main defensive system of Portugal - where the Portuguese army that had besieged Badajoz took refuge and was suffering a second catastrophic plague . A small relief army was improvised by the Portuguese which inflicted a crushing defeat to the Spanish army at the decisive battle of the Lines of Elvas ( 14 January 1659 ) . This way , the Portuguese independence was granted while the Spanish reached military advantage in the secondary front of war , Minho and Galicia . Background . After the death of John IV of Portugal in 1656 , various Spanish offensives were launched against Portuguese territory , mainly from Extremadura , but also from Galicia , where a second front was opened to force the Portuguese to divide their forces . The Spanish Army of Extremadura , recently reinforced with many veterans of the war against France , was commanded by Francisco de Tuttavilla , Duke of San German , who appointed Gaspar Téllez - Girón y Sandoval , Duke of Osuna , as general of artillery and his second - in - command . In 1657 they laid siege to the Portuguese town of Olivença with 8 , 000 soldiers and 29 cannons and occupied the town , despite a desperate attempt by the Count of San Lorenzo , military governor of Alentejo , to dislodge them by launching a surprise attack himself on the Spanish town of Badajoz . Mourão fell into Spanish hands shortly thereafter . San Lorenzo was then dismissed from his command and replaced by dom Joanne Mendes de Vasconcelos , who easily managed to retake both Mourão and Olivença in the following months , since their Spanish garrisons had been considerably diminished in order to move troops to face the French armies in Catalonia . Mendes de Vasconcelos , encouraged by his successes , promised the Portuguese Queen Regent Luisa de Guzmán that he would capture the town of Badajoz , headquarters of the Spanish Army of Extremadura and therefore the most important Spanish fortress near the Portuguese frontier . The Count of Sabugal suggested that an offensive in the north , to conquer the Galician city of Tui , would be easier , due to the mild climate of the coast , and suggested that this would also be strategically more beneficial as it would secure the province of Entre Douro e Minho . But the queen and her ministers preferred Mendes de Vasconcelos ' plan . He was given command of an army consisting of 14 , 000 infantry and 3 , 000 cavalry troops with a train of 20 cannons and 2 mortars , gathered in the main fortress of Elvas . Mendes de Vasconcelos ' second - in - command was the recently appointed Maestro de Campo General dom Rodrigo de Castro , a friend of the Count of Soure , Vasconcelos ' enemy in the court , which was a cause of friction between them . The Spanish fortress town of Badajoz was at that time garrisoned by 4 , 000 infantry and 2 , 000 cavalry soldiers . The military governor of the fortress was the Marquis of Lanzarote , Diego Paniagua y Zúñiga , but the command of the army belonged to the Duke of San German , who had retreated to Badajoz after the loss of Olivenza , which he had briefly attempted to retake . The infantry was led by don Diego Caballero de Illescas , the tercios by don Rodrigo de Múgica y Butrón , the cavalry by the Duke of Osuna , and the artillery by don Gaspar de la Cueva , brother of the Viceroy of New Spain . The defenses of the town consisted essentially of an old Moorish Alcazaba and a medieval wall dating from the Almohad period , reinforced since the outbreak of the war in 1640 by various newly built bulwark s and ravelin s . Siege . Preliminary maneuvers . The Portuguese army left its fortress at Elvas on 12 July and arrived outside Badajoz the following day . A company of cuirassier s under dom Luiz de Menezes and some cavalry troops commanded by dom André de Albuquerque were confronted near a bridge over the Guadiana river by a Spanish cavalry party led by the Duke of Osuna . Both units retreated after inflicting serious losses upon each other in a bloody fight , the Spanish seeking protection behind the walls of the town . Mendes de Vasconcelos arrived shortly thereafter with the main Portuguese army , with its artillery , and a large number of supply wagon s brought from Elvas . Seeing the strength of the Portuguese army , the Duke of San German hastily sent a message calling on Philip IV for help . Despite the longstanding danger of a Portuguese attack , the situation of the Spanish force in Badajoz was dreadful . The garrison suffered from a lack of ammunition and supplies , the soldiers were dressed in rags or were practically nude , and there was none among the civilian population of the town trained to wield a weapon . The Duke of San German put soldiers and civilians to work on the fortifications and storing food . The Portuguese sapper s , meanwhile , proceeded to prepare the field for an assault upon the fortress . Mendes de Vasconcelos had decided , in a war council with many other senior officers , to attack Fort San Cristóbal , a key point in the Badajoz defenses . This fort , built after 1640 , covered a bridgehead over the Guadiana river , thus guarding access to the city . A redoubt was quickly strengthened on the bridgehead by the Spanish sappers , who , protected by the Duke of Osuna and his cavalry , also widened the trenches which connected it with Fort San Cristóbal , the garrison of which was being strengthened every day along a strongly defended communication road . The Portuguese assault was thoroughly prepared . The plan was for six Portuguese squadrons under dom João da Silva to block the entrance to the bridge , isolating the redoubt from Fort San Crisóbal . The fort would in turn be attacked by Alfonso Futrado and Simon Correa da Silva . Maestre de Campo dom Diogo Gomes was given the task of cutting the communication lines along the Guadiana river and Pedro Almado of distracting several minor forts nearby . Some cavalry regiments were deployed in the expectation of a fierce Spanish resistance . The assault , however , was a costly failure . After twenty - two days of prolonged action , during which the defenders , led by the Marquis of Lanzarote , virtually wiped out Almado ' s regiment with musketry fire and firebombs , Mendes de Vasconcelos ordered a withdrawal . Attempted encirclement . The Portuguese general , convinced of the impossibility of taking Badajoz by assault , changed his strategy and began a circumvallation of the town , in order to try to isolate it completely . The Spanish , meanwhile , were reinforcing their own defensive fortifications with extensive works , mainly ravelin s built between the medieval towers . Various outlying forts were also strengthened with the aim of obstructing the Portuguese works and forcing them to build a larger circumvallation line . One of these forts was San Miguel , a star fort able to accommodate 600 infantry , built around a hermitage . It had five earthen bulwarks and an artillery - proof parapet . Portuguese sappers built a pontoon bridge over the Guadiana river which united two Portuguese quarters in Vado del Moro and allowed Mendes de Vasconcelos ' troops to cross the river . Having reinforced Santa Engracia , north of San Critsóbal , and fortified a bridge over the Gévora river , they built , unmolested , an arc of the circumvallation from Gévora to Vado del Moro . Fort del Mayordomo , located near the Guadiana river , had been abandoned by its Spanish garrison shortly after being built . The Portuguese used it to cover the construction of the circumvallation line to the Guadiana . They also tried to occupy Cerro del Viento , a hill near Vado del Moro , but were repelled by the Spanish garrison that was there and had to build the circumvallation line behind it . Given the strategic importance of Cerro del Viento , the nearby hill of Cerro de las Mayas had been earmarked for an improvised star fortification by the Italian general Ventura de Tarragona , but it had not been built , leaving the Fort of San Miguel vulnerable . Mendes de Vasconcelos instructed dom André de Albuquerque , dom Rodrigo de Castro and the Count of Misquitella to occupy the Convent of San Gabriel . All the Portuguese cavalry and five " terço s " were dispatched with this aim . They passed through the undefended Cerro de las Mayas and easily overran the convent , whose small Spanish garrison promptly surrendered . The Portuguese sappers then began to build a fort in front of an old watchtower known as " " Torre quebrada " " , located between the convent and the Fort of San Miguel . The continued Spanish occupation of the Fort of San Miguel was preventing the completion of the circumvallation line , so its capture was a priority to Vasconcellos . Albuquerque and the Count of Misquitellos , assisted by the engineers Nicolao de Lanres , Pedro de S . Coloma , and Luiz Serrão Pimentel , planned an assault on the fortification . On 20 June , after an ineffective bombardment by a 6 - gun battery put in place to try to breach the parapets , the Portuguese tercios and the cavalry , the latter covered by ranks of musketeers , were ordered to attack . The advance was made difficult by the presence of vineyard fences in the field . Moreover , 5 Portuguese battalions at the head of the attack were surprised by the Spanish cavalry of the Duke of Osuna and his general , don Juan de Pacheco , followed by the Duke of San German who , with various Spanish tercios , had sallied out of Badajoz in order to try to counter the Portuguese assault . Maestre de Campo of Tercio de la Armada , whose brother the Irish officer William Dongan was the commander of the Fort of San Miguel , managed to reach the fort . Albuquerque , meanwhile ordered dom Luiz de Menezes to reinforce his vanguard battalions . The Portuguese cavalry was also sent into action . Teniente General Diniz de Mello de Castro was wounded and captured , but a Spanish counter - attack was repelled and the Fort of San Miguel finally surrendered . Skirmishing and bombardment . The capture of Fort San Miguel allowed the Portuguese sappers to complete the circumvallation works , which consisted of a continuous line of little forts , each able to garrison as many as about 200 soldiers , or perhaps as few as 25 musketeers . The Spanish also continued strengthening their defenses . The Southwestern section of the wall was fortified at Pedraleras , and a ravelin was erected 400 meters in front of the Gate of Santa Maria . No significant action took place during this period , except for an ambush near San Gabriel by André de Albuquerque , against a Spanish supply convoy sent from La Albuera , and various sorties by the garrison of Badajoz to try to obstruct the Portuguese works . A night attack by the Spanish Duke of Osuna against a Portuguese section cost Mendes de Vasconcelos 200 infantry and 40 horses . On 6 August , however , Osuna and San German abandoned the town , and with 1 , 200 cavalry soldiers , broke the lines of circumvallation near the quarter of Santa Engracia , between two Portuguese redoubts , reaching Alburquerque shortly thereafter . San German was replaced in the command of Badajoz by Rodrigo de Múgica y Butrón , his Maestre de Campo General . The Spanish concentrated their efforts on the defense of a large ravelin in Pradaleras garrisoned by 2 , 000 infantry and 1 , 000 cavalry , against Portuguese artillery fire from Cerro del Viento and San Miguel . In late August , news of the formation of a relief army under Philip IV of Spain ' s favorite Luis de Haro reached the Portuguese camp , increasing the pressure upon Mendes de Vasconcelos to bring his siege to a conclusion . Unfortunately , the damage caused by the bombardment of the Spanish positions was minor , and heat and disease was decimating the Portuguese army . Relief . The Duke of Medina de las Torres had suggested that Philip IV himself should lead the relief of Badajoz in the company of all the Grandees of Spain . Luis de Haro , Philip IV ' s favourite , however , feared that Queen Mariana of Austria would be given the government of the country during the absence of the king , and , although having no military experience , offered himself to lead the relief army . His force consisted of up to 12 , 000 infantry and 4 , 500 cavalry , or perhaps as little as 8 , 000 infantry and 1 , 000 cavalry . Haro did not reach Badajoz until mid - October , but his appearance compelled Mendes de Vasconcelos to abandon the siege . The buildings in Cerro del Viento were set on fire and the bridge over the Gévora river was destroyed , The Portuguese army retreated unmolested to Elvas having lost 6 , 200 men in all , either killed in battle or dead from disease . Aftermath . When the Spanish relief army arrived , Luis de Haro entered Badajoz , where he was acclaimed by some as " " Liberator of the town and Restorator of the Monarchy " " . In Portugal , Queen Luisa de Guzmán imprisoned Mendes de Vasconcelos for his failure to capture Badajoz . News of a further setback for the Portuguese arrived from the northern frontier , as a Spanish army commanded by the Governor of Galicia , Rodrigo Pimentel , Marquis of Viana , entered Portuguese territory in early September , defeating a Portuguese army led by João Rodrigues de Vasconcelos e Sousa , 2nd Count of Castelo Melhor at the Battle of Vilanova . Spanish forces proceeded over the following months to capture Lapela , Monção , Salvatierra de Miño and other Portuguese strongholds . De Haro , meanwhile , decided to attack Portugal on his own and , against the advice of the Duke of San German , advanced towards the Portuguese fortress of Elvas . Elvas was reached by the Spanish army on 22 October and a siege begun . Although the fortifications could not ensure safety from a full - scale assault supported with heavy guns , they enabled the defenders to withstand a considerable attack for enough time to allow the Portuguese to mobilize a relief army in Estremoz , firstly under André de Albuquerque and later under António Luís de Meneses , Count of Cantanhede . On 17 January , around 8 o ' clock in the morning , the Portuguese attacked the Spanish in their trenches . The battle was undecided in its initial stages , as the Duke of San Germán and other Spanish generals made every effort to collect their troops and recover the lost ground , but after some time , the Portuguese forces of Cantanhede managed to break the lines and the Spanish retreated to Badajoz with great loss : from the initial army of 17 , 500 men , only 5 , 000 infantry men plus 1 , 300 horsemen managed to reach Badajoz , and all the artillery together with 5 , 000 men , 15 , 000 firearms , luggage and correspondence , were captured . The Portuguese army again besieged Badajoz shortly after , bringing events in the region full circle , but failed once again to take the city . By then , the signing of the Treaty of the Pyrenees had ended Spains ' s war with France and the recovery of Portugal had become the main objective of Philip IV .