However in 1640 England supported the Portuguese House of Braganza to take power in Portugal replacing the House of Habsburg, putting an end to a 60-year dynastic union between Portugal and Spain. England's support for Portugal during their Restoration War was confirmation of the renewal of the alliance. This was solidified further after the English Restoration and the marriage of Catherine of Braganza and Charles II of England. Portugal ceded Tangier and Bombay as part of the dowry. England in addition to military support on the ground would protect Portuguese shipments in the Mediterranean and the coasts of Lisbon and Porto. Following the defeat of Spain in the war, England mediated the Treaty of Lisbon in 1668 which saw the independence of Portugal and the recognition of Pedro II as King. The English alliance was decisive in the consolidation of the independence of Portugal, and in Pedro's leadership. In return Portugal promised to transfer to the English the majority of the places recovered from the Dutch, to share in half the commerce of cinnamon and to install English families with the same privileges as Portuguese families in Goa, Cochin, Diu, Bahia, Pernambuco and Rio de Janeiro.