Sir Richard Fanshawe, English ambassador in Portugal from 1662 to 1666, was also appointed ambassador to Spain in 1664.
He was instructed to agree a treaty of commerce, obtain reparations for losses and confirm possession of territories captured from 1654 to 1660, primarily Jamaica.

In 1663, Philip launched a major military offensive against Portugal and refused to negotiate while England was assisting 'rebels'.
Talks opened in 1664 when the offensive failed, halted when the Second Anglo-Dutch War began in March 1665, then restarted following Spanish defeat at the Battle of Montes Claros in June.
Philip died in September, leaving his three year old son Charles II as king, and his wife Mariana of Austria as regent.

Ending the war with Portugal was a priority for the new Spanish government and Juan Nithard made an Anglo-Spanish treaty dependent on English help in achieving this.
However, Louis encouraged Portugal to insist on harsh terms, seeking to prevent Spain reinforcing the Spanish Netherlands.

In December, Fanshawe finalised terms with Count Peñaranda, a member of the Spanish Regency Council, using the 1630 Treaty of Madrid as a base.
They were unaware of discussions in London between the Spanish ambassador, Count Molina, the Duke of York and Arlington.
Charles refused to ratify Fanshawe's version, claiming he had exceeded instructions and replaced him with Lord Sandwich.
Fanshawe died in June 1666, shortly before returning home.

In March 1667, France and Portugal signed the Treaty of Lisbon, a ten year offensive and defensive alliance against Spain; on 24 May, French troops entered the Spanish Netherlands in the War of Devolution.
Facing the prospect of years of war with Portugal and the loss of their provinces to France, Spain now quickly came to terms.
Sir Richard Fanshawe, English ambassador in Portugal from 1662 to 1666, was also appointed ambassador to Spain in 1664. He was instructed to agree a treaty of commerce, obtain reparations for losses and confirm possession of territories captured from 1654 to 1660, primarily Jamaica.
In 1663, Philip launched a major military offensive against Portugal and refused to negotiate while England was assisting 'rebels'. Talks opened in 1664 when the offensive failed, halted when the Second Anglo-Dutch War began in March 1665, then restarted following Spanish defeat at the Battle of Montes Claros in June. Philip died in September, leaving his three year old son Charles II as king, and his wife Mariana of Austria as regent.
Ending the war with Portugal was a priority for the new Spanish government and Juan Nithard made an Anglo-Spanish treaty dependent on English help in achieving this. However, Louis encouraged Portugal to insist on harsh terms, seeking to prevent Spain reinforcing the Spanish Netherlands.
In December, Fanshawe finalised terms with Count Peñaranda, a member of the Spanish Regency Council, using the 1630 Treaty of Madrid as a base. They were unaware of discussions in London between the Spanish ambassador, Count Molina, the Duke of York and Arlington. Charles refused to ratify Fanshawe's version, claiming he had exceeded instructions and replaced him with Lord Sandwich. Fanshawe died in June 1666, shortly before returning home.
In March 1667, France and Portugal signed the Treaty of Lisbon, a ten year offensive and defensive alliance against Spain; on 24 May, French troops entered the Spanish Netherlands in the War of Devolution. Facing the prospect of years of war with Portugal and the loss of their provinces to France, Spain now quickly came to terms.
Treaty of Madrid (1667)