It consisted of three separate agreements: a defensive alliance, an undertaking to oblige Spain and France to make peace, and secret clauses that included mediating an end to the war between Spain and Portugal and enforcing the peace by military action if required.