A group of Greenpeace campaigners charged with aggravated trespass and criminal damage have attempted to summon the Attorney General to court.
The 14 activists are accused of chaining themselves to tanks and trucks at Marchwood Military Ports in Southampton on 3 February last year.
They say they acted "out of necessity" to prevent the "illegal" war in Iraq.
Lord Goldsmith's advice to ministers on whether the war was legal is crucial to their defence.
Raise public awareness
The court heard that the group was trying to make the public aware that arms that might be used in an unlawful war were being loaded on to tanks.
Greenpeace counsel Tim Owen QC said: "The defendants decided that they urgently needed to take whatever action they could to prevent a war which was likely to cause thousands of deaths."
The activists have lodged the same "defence of necessity" used by GCHQ whistleblower Katherine Gun.
The case against Mrs Gun was dropped after her lawyers asked to see the Attorney General's advice last month.
Mr Owen said: "There are in existence, or were in existence, two versions of the Attorney General's advice.
"The implication being the final version had been in the face of a specific request from the chief of defence that what was planned would, in fact, be lawful."
Richard Whittam, counsel for the Crown Prosecution Service, said the tanks were actually going to Germany and the defence of necessity was irrelevant in this case because the activists' actions were not taken with a view to actually stopping the war.