Towards the end of the 17th century, Spain was in decline and King Charles II had no direct heirs, which led the European powers to anticipate a conflict over the Spanish throne. Portugal embarked on intense diplomatic activity with various powers and negotiated contingencies in the event of a new military confrontation. Charles II died in 1700 and in his will named Duke Phillip of Anjou as his successor, who thus ascended the throne as Philip V of Spain. King
Peter II of Portugal wished to secure the border of
Brazil by expanding it to the
River Plate, which was a much clearer and safer boundary with Spanish America, and acquire the Spanish towns of
Tui,
Vigo,
Baiona,
A Guarda,
Badajoz,
Albuquerque and
Valencia de Alcántara to strengthen Portugal's defences in Europe. As England did not support this expansionist project and the main Portuguese diplomat, the
Duke of Cadaval, was pro-French, the Portuguese king recognised Philip V against the opinion of his advisers and Portugal initially aligned with France. The war between France and the allied powers began throughout Europe and the Mediterranean in 1701. French defeats the following year and the fact that France failed to produce a fleet that would help Portugal defend its colonies and shipping routes as per the agreement led king Peter to reconsider his position. He did not wish to antagonize Britain and the Netherlands, and furthermore Philip V insisted on addressing King Pedro II insultingly as
Duke of Bragança only, which exposed his intentions to reannex Portugal into Spain. All this led Portugal to abandon the pro-Bourbon bloc in September 1702. A brief period of Portuguese neutrality followed. In return, the allies would support Portugal with 12,000 soldiers and also pay for the recruitment of 13,000 more, in annual instalments of one million
patacas. The defences at the mouth of the
Tagus were reinforced, the navy was put on alert and warnings and signals were tested on land. Judge António Rodrigues da Costa was instructed to write up a "Justification" in Spanish and Latin of the reasons for Portugal's intervention in the conflict to be published abroad. The number of men in each
terço was increased from 660 men to 800 and then 1000. By a royal decree dated 14 November 1702 every regular army
terço was to have two companies of
grenadiers. The number of men in cavalry companies was increased from 80 to 120, while the artillery corps was increased from 500 men to 1000. The reasons for Portugal's involvement in the war were poorly understood by most of the population however, and few believed in the outbreak of hostilities. In August of that year, a fleet of 40 merchant ships called at Lisbon with a large cargo of cod, cheese, and butter, and loaded Portuguese products in a peaceful atmosphere. On 7 March 1704, Archduke Charles landed at Lisbon accompanied by allied troops, as Portugal had insisted during negotiations. This event represented an unprecedented international recognition of the
House of Braganza and was celebrated lavishly. The English troops were commanded by the
Duke of Schomberg and the Dutch by
François Nicolas Fagel. ==The Iberian theater==