The Luxembourg-based ECJ is the upholder of the European Union's treaties, resolving disputes over their interpretation and deciding how they should be applied. It is also responsible for deciding on the application of legislation coming out of the EU. Its decisions are binding, and it can fine states which fail to respect its judgments. The European Justices - the best-paid of EU civil servants - are chosen from each of the 15 member states.
The court has increasingly been regarded as a political body, using its powers to advance the federalist case in Europe. But lawyers in Brussels frequently refer to the way in which judgments seem to be inconsistent with prior decisions, making it hard to work out how any particular case will be judged.
In the past Britain has argued that it is important to boost the ECJ's powers so as to ensure that all legislation is properly enacted and enforced in all EU states. Many lawyers, however, are sceptical of the court's role as the bulwark of legality.
Britain has frequently found itself questioning ECJ decisions, over - for instance - pensions law or EU directives that apply to privatised companies. It has also steadfastly resisted allowing the court any role in the sensitive areas of the Common Foreign and Security Policy or Justice and Home Affairs - fearing this would represent a further extension of the powers of federal institutions.
The International Court of Justice (ICJ), based in The Hague, was set up in 1945 under the United Nations Charter as the principal judicial organ of the UN but, like the rest of the UN, it lacks effectiveness because it has to act with a degree of consensus and it moves slowly. It is only binding on signatory countries. As with the UN, a country can pull out with more harm for the court than for the country's international prestige. After the court ruled against it on atmospheric nuclear testing in 1973, France withdrew acceptance of the court's jurisdiction.
The ICJ is supposed to act as a world court, using international treaties as its statutes and settling disputes between states in accordance with international law, and has ruled in 59 cases since 1973, covering land frontiers, maritime boundaries, territorial sovereignty, the use of force, diplomatic relations and nationality. Its 15 judges from different countries are elected for nine-year terms by the UN General Assembly. Their procedure is normally slow and cumbersome, commonly taking years for a case. The recent nuclear testing case was exceptional in that it was heard quickly enough to be meaningful.
In that case, New Zealand lost on technical grounds in its bid to have France's underground nuclear tests under the Mururoa atoll declared unlawful. The court takes written, then oral, submissions from any interested countries. The judges deliberate in private, then read out their judgments in public.