"Anarchy" could prevail if anti-war protesters are allowed to argue that they were right to take action to prevent the Iraq war, Law Lords heard.
Some protesters occupied tanks at a military port in Southampton
David Perry, for the Crown, said if this was the case there would be little to stop foreign belligerent states from using the same argument.
But Keir Starmer QC, for five of the activists, said the rule of law should apply irrespective of the consequences.
The Law Lords are hearing appeals by 20 anti-war protesters.
Fourteen say they should not have been convicted of aggravated trespass near Southampton docks because they were trying to stop an "illegal war".
Another protester is using the same argument after she was convicted of aggravated burglary for entering RAF Fairford in Gloucestershire.
A further five, who are alleged to have tried to immobilise American B52 bombers at Fairford, are due to stand trial separately at Bristol Crown Court later this year - and their defence will depend on the House of Lords hearing.
The Law Lords are being asked to decide whether a valid defence is available to activists who allegedly broke the law and committed a crime to prevent what they regarded as an even greater "crime of aggression".
The group of 20 say that if you can establish an offence is a crime under international law, it should also be an offence under section three of the Criminal Law Act 1967.
But Mr Perry told the Law Lords it was not their role to "make law".
"We would submit that the power to create laws is no longer a matter, we would say respectfully, for your lordships because there is no authority or mandate for a court to create a law," he said.
"All the more so where in this case there would be potential implications for the foreign relations of the UK."
He said it was "not just Greenpeace supporters" that may act on anything the Law Lords say. "Why should not foreign belligerent states use the crime and defence?"
Mr Perry added: "Self help remedies must be controlled because they can degenerate into anarchy."
But Mr Starmer argued that some of the arguments being raised by the Crown had nothing to do with this particular case.
"The judges aren't creating law in any shape or form.
"It is whether the long standing principle, that an offence under customary international law is an offence under common law, is ever applied."
In earlier hearings, judges have ruled that the courts cannot deal with the legality of the war, which was considered to be a political matter.
The Court of Appeal said that acting to prevent the commission of a crime could be considered as a defence, but added that in reality in cases like this "they were protests and were not attempts to prevent crimes".
Rabinder Singh QC, defending 15 of the group, told the Law Lords, headed by Lord Bingham, that the protesters were being wrongly deprived of a defence which would have questioned the legality of the war and which could have resulted in their acquittals.