Much has been written about the substance of the Prime Minister’s renegotiation of the UK’s membership of the European Union. Will the “emergency brake” on welfare have any impact on migration? Does the promised new “red card” system restore any significant powers to the British Parliament?

As we debate these matters, however, we should not lose sight of a prior question: what legal status will the renegotiation have?

When David Cameron set out his plans for a renegotiation followed by a referendum in his Bloomberg Speech three years ago, he said the best way to give effect to the outcome would be a new EU Treaty. Government ministers promised they would secure that before the referendum. They have failed to do so.

Read more: The Out campaigns need to stop fighting to secure Brexit

Why does this matter? Because any promised changes which are not contained in a new Treaty will not be worth the paper they are written on. The European Court of Justice (ECJ) has made clear that the EU Treaties can only be changed by a new EU Treaty. This must be ratified by every member state in accordance with its constitution. Some might have to hold referendums. We would not know the result until several years after we voted.

The government contends that a promise to change the Treaties after the poll can be legally binding. That is not the case. The former director general of the Legal Service of the Council of the European Union, Jean-Claude Piris, has said that the notion of a binding promise to change the Treaties in the future is “bullshit”. Sir Konrad Schiemann, the UK’s former judge in the ECJ, agrees with him.

The government is now relying on a flawed model used to keep Denmark in the EU in 1992 after Danish voters rejected the Maastricht Treaty. The Prime Minister claims that “Denmark negotiated the same sort of legal opt-outs and, 23 years on, they clearly stand and are legally binding. Those are the facts.” He is, sadly, mistaken.

Promises made to Denmark in 1992 were broken. EU leaders pledged that EU citizenship would “not in any way take the place of national citizenship”. Less than a decade later, the ECJ declared that EU citizenship would “be the fundamental status of nationals of the Member States”. That claim has now been repeated by EU courts on 80 occasions, most recently in a case concerning the government’s faltering attempts to deport Abu Hamza’s daughter-in-law.

Read more: In the EU debate we should be wary of apocalyptic predictions

Denmark was also promised that it would remain in control of Danish citizenship. Yet the ECJ has said it can decide the conditions under which a person loses Danish citizenship. Our Supreme Court said last year that the ECJ’s decisions fly “in the face of the clear language” of the promises made to Denmark in 1992.

The government’s next claim is that its deal will be “binding in international law”. This is misleading. The draft agreement says it is “in conformity” with the EU Treaties. Under the 1969 Vienna Convention, this means the EU Treaties will have precedence over the renegotiation in international law.

Finally, the government promises the agreement will be deposited at the United Nations. Registering treaties with the UN was introduced as a means of preventing secret treaties that caused many wars throughout history. The UN itself states that registration will not change an agreement’s status and that it will accept any document the British government gives it. The Danish agreement was registered at the UN, but this did not stop EU judges overruling it.

EU judges have in any event stated that they will ignore international law where it conflicts with the EU Treaties. In 2008, the ECJ said that “the obligations imposed by an international agreement cannot have the effect of prejudicing the constitutional principles” of the EU Treaties. This is particularly significant, since the case involved the ECJ refusing to uphold UN Security Council resolutions. Under international law, these have precedence over everything else.

The best the government will get will be a political, not a legal, agreement from the EU. As the president of the European Council, Donald Tusk, said in December, the UK will obtain “a political declaration because it’s impossible to change the treaty before the referendum”. The ECJ has previously said that such a political declaration “has no legal significance”.

What does this all mean? Any person who contends that his or her legal rights are adversely affected by the renegotiation will be able to challenge it in the courts and ask the ECJ to annul the agreement. EU judges will not enforce this deal. When members of the public come to cast their votes in the referendum, they should be aware that the EU’s promises will have no better legal status than an unsigned contract.