The Israeli government has agreed to allow representatives of Time magazine and former defense minister Ariel Sharon to examine several secret government documents related to the 1982 massacres of hundreds of Palestinians at two Beirut refugee camps.

The cabinet's unexpected decision on Monday, which was ratified late yesterday by a committee of the Knesset, Israel's parliament, should resolve key issues in dispute in Sharon's $50 million libel lawsuit against Time.

During the six-week trial in New York, Sharon has denied categorically a Time report suggesting that the classified papers document his foreknowledge of and acquiescence in the killings by Israeli-backed Lebanese Christian Phalangists. Time reported that Sharon had discussed with the Phalangists the need to take revenge the day before the massacres began and that details of the conversation are in the papers.

Time editors and the magazine's Jerusalem correspondent David Halevy have defended the accuracy of the report in testimony during the trial but the magazine's lawyers say that Time will print a correction or retraction if proved wrong.

Halevy testified that he had based his reporting on leads from confidential sources and his own "analysis" but had not seen the secret documents. His superiors at the magazine acknowledged when questioned on the witness stand that they did not know who his sources were.

Citing national security and foreign policy concerns, the Israeli cabinet and courts had rejected Time's request for access to a broad range of secret testimony and documents gathered by an Israeli commission, called the Kahan Commission, during its investigation of the massacres.

But on Monday night, a four-member ministerial committee of the Israeli cabinet headed by Prime Minister Shimon Peres agreed to a compromise formula proposed by the U.S. judge in the trial, Abraham D. Sofaer. The arrangement was approved 18 to 2 yesterday by a parliamentary committee.

The cabinet decision allows perusal of a classified appendix to the Kahan Commission report and notes of meetings Sharon had with Phalangist leaders before the massacres.

Two Israeli lawyers, one for Time and one for Sharon, will read the material in the presence of Justice Yitzhak Kahan, who headed the three-member commission that investigated the massacres.

Kahan will respond in writing to three questions by the U.S. court:

* Do the documents show or hint that Sharon in conversation with Phalangist leaders discussed avenging the murder of Phalangist militia commander Bashir Gemayel, who was assassinated two days before the massacres began?

* Do they indicate that Sharon held a conversation with a Phalangist in which either of them mentioned the need for revenge?

* Do they indicate that Sharon knew in advance that the Phalangists would massacre civilians if they entered the refugee camps unaccompanied by Israeli troops?

Stuart Gold, one of Time's New York lawyers, said his understanding of the cabinet decision is that the Israeli lawyers examining the documents will be pledged not to reveal the contents of the documents to their American associates but will be allowed to say whether they disagree with Kahan's answers to the questions.

While acknowledging that the review will more than likely settle the question of whether the Time report was accurate, Gold said the magazine still felt it should be entitled to access to more documents than those included in the compromise.

"We want everything," Gold said. "We want all the documents Sharon gave the commission."

Sharon's lead New York attorney, Milton S. Gould, countered in a separate telephone interview, "They can go on asking. This is what we are going to get."

Gould argued that Time, in fact, really did not want to see the classified papers. "They know there's nothing there," he said.

The Kahan Commission found that Sharon bore "indirect responsibility" for the massacres and recommended his ouster as defense minister. But the commission absolved him and other top Israeli civilian and military officials of either encouraging or knowing beforehand that the killings would occur.

Sharon still disagrees with the commission's findings, which he once bitterly complained had stamped the "mark of Cain" on him. He contended in testimony that the Time report was a "blood libel" tantamount to calling him a mass murderer and had brought on "a new wave of hatred" against him.

The trial is to resume today in the U.S. courthouse in Lower Manhattan after an 11-day recess.

Just before the break, Time's lawyers surprised courtroom observers, and Sharon's attorneys, with a surprise announcement that they would rest their case without calling a single witness. Although Sharon's lawyers joked afterward that Time had done so because they had no case, the tactical maneuver clearly concerned them.