In their ruling on Wednesday, the judges said: "In the absence of the prospect of a trial, the accused cannot be held in custody. The only correct course is to order the release of the accused because... a fair trial of the accused is impossible."
The judges said they had given full consideration to the fears of Lubanga's alleged victims in deciding to release him.
Lubanga is accused of recruiting child soldiers in the northeastern district of Ituri.
The area has long been riven by fighting over its rich natural resources, including gold, diamonds and oil and violence raged there well after a peace accord officially ended the DRC conflict.
Victims have warned that freeing the former warlord could ignite a "fire ball" in Ituri.
Experts estimate that a decade of violence in the DRC has killed 5.4 million people, mainly through hunger and disease.
Lubanga's trial had been due to start last week and the halt to proceedings is a major setback for the court which was set up in 2002.
It currently numbers 106 member states and is also investigating crimes in Sudan, Uganda and the Central African Republic.
The prosecution has withheld from the defence documents provided by the United Nations and others that could help Lubanga's case because they were given on condition of confidentiality to protect sources in conflict zones.
|Lubanga has been accused of
enlisting child soldiers [AP]
The prosecution had said that the trial should be allowed to continue because the United Nations had now agreed to let the judges view most of the material, but Adrian Fulford, the presiding Judge, rejected the strict UN conditions.
Luis Moreno-Ocampo, the chief prosecutor, said he hoped the dispute over evidence can be resolved so the trial can get under way in September, and requested a suspension of any release.
He said: "The need to do justice for the victims in Congo and to respect a fair trial for Thomas Lubanga can and must be harmonised.
"The ICC is a permanent and global institution. It must be based on the highest standards of law."
Lorraine Smith, from the International Bar Association, said the court was in a tough position.
She said: "This is the purpose of independent judges. They have taken a difficult decision but one that will ensure trials are fair."
The judges also granted the prosecution leave to appeal against the halt to proceedings and rejected a defence call to nullify Lubanga's arrest warrant, saying there were still reasonable grounds to believe that he is criminally responsible.
Their ruling said: "It is to be emphasised therefore that the stay imposed on the proceedings does not undermine the validity of the warrant since it is no more than the direct result of the present impossibility of trying the accused fairly."
The judges' decision will overshadow a celebration planned in The Hague on Thursday to mark the 10th anniversary of the court's founding treaty, the Rome Statute.
Meanwhile, Jean-Pierre Bemba, the Congolese former rebel warlord and vice-president, has been transferred from Belgium to the custody of the ICC.
He is accused by the court of leading Congolese rebels who waged a campaign of rape and torture in the Central African Republic in 2002-2003.
"The court appreciates the steps taken by the Belgian authorities in the enforcement of the warrant of arrest, surrender and transfer of Mr Bemba," the ICC said in a statement.
Bemba, whose lawyers had mounted a series of challenges in Belgian courts to his arrest and transfer, will be held at the court's detention centre in Scheveningen close to The Hague.
The ICC has not announced a date for an initial appearance of Bemba, the defeated contender in DRC's 2006 presidential election.