These are set out in a protocol to the constitution, the difference between that and a “declaration” being that a protocol has legal effect.
In Article 1, both countries state that, subject to Article 3, they will
"not take part in the adoption by the Council of proposed measures pursuant to Section 2 or Section 3 of Chapter IV of Title III of Part III of the Constitution or to Article III-161 insofar as that Article relates to the areas covered by those Sections or to Article III-164 or Article III-176(2)a."
Section 2 relates to "policies on border checks, asylum and immigration" and Section 3 to "judicial co-operation on civil matters".
This is followed by Article 2, which states unequivocally that neither Section 1 or 2 shall apply, nor Arts III-161 (regulations on evaluating the implementation of Union policies) and Art III-164 (regulations on administrative co-operation).
This does look like a pretty watertight defence of Blair's "red line", except for one minor detail… Section 1 still applies which, inter alia, requires that member states:
"…shall frame a common policy on asylum, immigration and border control…".
Er… what red line, Mr Blair?
On the final page of the agreement is a “Declaration by member states”.
This is a “Declaration by the Kingdom of Spain and the United Kingdom of Great Britain and Northern Ireland”, noting that
"The Treaty establishing the Constitution applies to Gibraltar as a European territory for whose external relations a Member State is responsible. This shall not imply changes in the respective positions of the Member States concerned."
This is self-explanatory – the Spanish are not having Gibraltar… until Straw works out how to give it away.