Secret documents seized from Lt. Col. Oliver L. North's office could expose "people in very difficult situations to torture and death" in the Middle East if publicly disclosed, the prosecutor in the Iran-Contra case said Thursday.

At a hearing on providing classified documents to the defense, independent counsel Lawrence E. Walsh told U.S. District Judge Gerhard A. Gesell that some of the documents contain information so sensitive that a person known to have seen it would be in danger by travel to the Middle East."There were documents found in Col. North's safe he shouldn't have had" under government security regulations, Walsh said

The material included compilations of highly sensitive information that is usually scattered in bits and pieces throughout other documents.

"Why he had them I don't know," Walsh said.

Gesell has ruled that the defense is entitled to see 300,000 pages of classified material collected by Walsh so that lawyers for North and three co-defendants can determine if any of the documents would help their case.

Between 5 and 10 percent of the material is extremely sensitive, and government security experts are concerned about releasing it for inspection by at least one of North's co-defendants, businessman Albert Hakim, Walsh said.

"As advocates we have no interest in this whatever," Walsh said, indicating a rift with the Reagan administration over disclosure.

But government security experts are concerned about giving full access to Hakim, a security consultant who deals with governments in the Middle East and Asia, he said.

On Wednesday, Gesell accused the Reagan administration of intentionally withholding secret documents and threatened to dismiss the charges if the material is not made available to the defense.

Walsh, "so far as I know, is making every effort to produce the documents," Gesell said.