Former Israeli defense minister Ariel Sharon today refused to testify about certain details surrounding the September 1982 massacres of Palestinian civilians in Beirut until he was ordered in private to do so by the judge in his $50 million libel suit against Time Inc.

Cross-examination of Sharon by Time's lawyers was delayed while his attorney, Milton S. Gould, suggested in a conference away from the 10-member jury that the judge summon Sharon to offices behind the courtroom and direct him to answer the questions.

Gould told U.S. District Court Judge Abraham Sofaer, "I don't see how we can sustain Mr. Sharon's position that he won't answer questions about Elie Hobeika."

Hobeika, intelligence chief for the Christian Phalangist militia in Lebanon, has been identified as the leader of forces that committed the massacres in two Beirut Palestinian camps after being directed to go there by Sharon.

"I expect that Your Honor will direct him to answer questions about Hobeika, and if you do, I am sure he will answer them," Gould told the judge.

The judge then summoned Sharon outside the courtroom and reminded him that he was "under oath" and that even his own attorney "concedes that you were wrong" not to answer the questions.

Later, in the courtroom, the cocky and stubborn former general did give vague testimony about what he described as only fleeting encounters with Hobeika before the massacres. But, in refusing to answer questions about other matters, Sharon broadly invoked Israeli national security considerations and cited his concern about endangering the lives of Lebanese who had met with him.

The judge did allow him limited privilege to invoke national security concerns.

Under three days of direct questioning by Gould and during Time's cross-examination, which began today, Sharon has frequently brushed past questions and instead delivered lectures for the jury on Lebanese history and Israeli politics or cited statistics and other information of dubious relevance.

Asked today about how Israeli and Lebanese troops were deployed around the Palestinian camps before the massacres, Sharon used the occasion to give a short discourse on architecture.

"We speak about a built-up area, an Oriental town. I don't know if you ever had a chance to see an Oriental town with all the markets and arches," he observed.

He made no effort to conceal his contempt for Time's lawyers. Describing military positions on a map of Beirut, Sharon told Thomas D. Barr, the lead attorney for Time, "Usually north is always up. North is up there, always up . . . ."

Sharon has accused Time of committing a "blood libel" against Israel and the Jewish people for alleging in a paragraph of a February 1983 article that the day before the massacres began, he paid a condolence call on the family of Lebanese President-elect Bashir Gemayel and discussed with them the need "to take revenge" for his assassination one day earlier.

The article said details of that meeting with Gemayel's now-deceased father, Pierre, who headed the Phalangist party, and his brother, Amin, currently Lebanon's president, at their mountain estate north of Beirut were included in a secret appendix to Israel's Kahan Commission inquiry into the massacres.

In the public portion of the report, the commission made no such accusations, and absolved Sharon of direct responsibility for the killings of the more than 700 Palestinian civilians. But the commission said Sharon made a "grave mistake" in not foreseeing what would happen in dispatching the Phalangists into the refugee camps, and as a result bore indirect responsibility. On the panel's recommendation, Sharon was removed as defense minister.

Sharon has acknowledged sending the Phalangists to the camps but said it was done to root out 2,000 Palestine Liberation Organization guerrillas who had hidden there after the PLO was evacuated from Beirut one month earlier.

In testimony today, Sharon gave no clear responses to repeated questions of why only 150 Phalangists went into the camps if their purpose was to kill or apprehend 2,000 guerrillas.

Time has sought access to the classified section of the Kahan Commission report, but the Israeli government has denied the magazine's attorneys access, and has refused to allow Israeli officials who accompanied Sharon to the Gemayel home and to the Phalangist militia headquarters on Sept. 15, 1982, to testify here, citing national security reasons.

In a motion to dismiss Sharon's suit before trial, Time noted these obstacles and invoked the argument of the "act of state doctrine," which holds that a U.S. court is not the proper place to probe the actions of a foreign government.

Sofaer, in rejecting the motion, said he believed that the judiciary "was the most effective avenue" for resolving Sharon's claims.

Sharon has filed a similar suit in Israel, but courts there, citing a backlog of cases, have not acted.

Sofaer held that Sharon had standing to sue in U.S. courts because Israel and the United States are members of a 1970 Hague Convention permitting citizens of both countries access to the other's courts on civil and commercial matters. The judge also indicated his belief that it was unlikely that Sharon could gain relief through diplomatic channels.