The judge in the Iran-Contra case Friday ordered Oliver L. North to stand trial Sept. 20 and gave the fired White House aide access to a wide range of secret documents to show he acted with higher authority.

The order by U.S. District Judge Gerhard A. Gesell means that the first criminal trial resulting from the Iran-Contra affair is scheduled to be under way when the fall presidential campaign is in full swing.But Gesell's ruling on secret documents also pointedly raised the possibility that three major charges stemming from the diversion of U.S.-Iran arms-sale profits to the Nicaraguan rebels would not be part of the case when it goes to trial - if ever.

Gesell's order said that the defense had shown during a closed hearing on Wednesday that highly sensitive passages of documents that government security experts want deleted from the prosecution's case "tended to exonerate North of guilt on certain charges."

The documents and others are relevant to the major charges against North, former national security adviser John M. Poindexter and arms dealers Albert Hakim and retired Air Force Maj. Gen. Richard V. Secord, the judge said.

Gesell directed independent counsel Lawrence E. Walsh to produce any documents to support North's claims that money raised by Hakim and Secord from the arms deals was combined with government money "to plan and carry out various covert operations, including actions directly or indirectly supporting the Contras."

The judge ordered Walsh to turn over documents that corroborate North's claim that these activities "were all approved at or near Cabinet level; their execution was closely monitored through the use of a variety of intelligence methods and sources."

The documents should include those that show "funding of the activity from any source" and "whether or not senior government officials were aware of the activity," Gesell said.

Gesell said he was not ruling on the merits of North's defense or the admissibility of any documents as evidence.

"The jury must decide where the truth lies," Gesell said. But the judge said he was ordering the government to produce the highly secret documents "to assure that the truth, whatever it ultimately proves to be, `will out.' "

Under the Classified Information Procedures Act (CIPA), the government could decide it does not want to prosecute North on the major conspiracy charge because doing so would require disclosure of sensitive information that would jeopardize national security.

If the problems of disclosing secret government documents cannot be resolved by September, Gesell said he will proceed to try North on charges that don't require extensive use of classified material.

"At a minimum, substantive charges of cover-up, falsification and North's alleged receipt of personal benefit derived from his conduct as a government employee can proceed to trial," Gesell said.

"This trial date is six months after indictment. It must be met."

In a brief statement, Walsh said: "We are ready to proceed as directed by the court."

The charge that North conspired with his three co-defendants to defraud the government by illegally diverting arms-sale proceeds requires the most use of classified documents.

This charge, plus two others charging all four defendants with wire fraud and theft of government property, involve questions of whether the defendants intended to violate the law.

Among the secret materials sought by North, Gesell noted, "are documents bearing primarily on issues of criminal intent, which is of particular significance to the first three counts of the indictment."

An expected defense to the three charges is that North and his co-defendants acted with the implicit or explicit approval of higher officials in the Reagan administration. Gesell has ordered separate trials for all four defendants.

North should be given documents containing any references to covert aid to the Contras in President Reagan's daily intelligence briefings between Sept. 1, 1984, and Dec. 31, 1986, or in the president's regular daily briefing by his staff, Gesell said.

Any other information about aid to the Contras that was forwarded to the White House by the Central American Joint Intelligence Task Force during this period should also be provided, the judge said.

The judge also ordered Walsh to specify by Aug. 1 the documents he intends to produce as evidence against North on the other 13 charges against the former White House aide.