AUSTRALIA'S controversial military justice system is in disarray after a bizarre case where a sailor accused of ''tea-bagging'' a superior officer brought down the nation's top military court.

The High Court unanimously declared the Australian Military Court unconstitutional yesterday, saying the legislation that created it in 2006 was flawed.

At least 170 cases heard by the court over the past two years are in question and may have to be reheard. And amid the confusion last night, one defence force member held in a military facility was being prepared for release.

The decision has forced the Government to return to a discredited system of courts martial as it considers its next move. The Defence Minister, John Faulkner, said he and the Attorney-General, Robert McClelland, were seeking urgent legal advice on how the system could be replaced.

In a case that seemed more at home on Big Brother than in the nation's highest court, former Leading Seaman Brian George Lane had challenged the military's court's ability to try him for allegedly placing his genitals on the forehead of a sleeping army sergeant in a Queensland motel after a day's golf and drinking on August 4, 2005. They were in Roma on a recruitment drive with two other defence force personnel. Mr Lane pleaded not guilty.