Ambassadors of three Islamic countries have worked since Wednesday night at Washington police headquarters in an attempt to negotiate the release of dozens of hostages held by Hanafi Muslims at three city locations.

The ambassadors - Ardeshir Zahedi of Iran, Sahabzada Yaqub-Khan of Pakistan and Ashraf A. Ghorbal of Egypt - began their effort at the Municipal Center at about 6:30 p.m. Wednesday, according to embassy spokesmen.

White House press secretary Jody Powell said yesterday that the move to contact the ambassadors was initiated "by the people who are holding the hostages." A State Department spokesman indicated that Metropolitan Police oficials contacted the ambassadors through the State Department.

"The police department was playing the major role in this," the spokesman said.

The ambassadors had four long telephone conversations with Hamaas Abdul Khaalis, the leader of the Hanafi Muslim group holding the hostages, according to a Pakistani embassy spokesman present during the discussions.

The spokesman, Mohammad Iqbal Butt, said Ambassador Yaqub-Kahn did most of the talking in the conversations with Khaalis.

Butt said Yaqub-Kahn urged Khaalis to be compassionate with his hostages and to adhere to Islamic principles. Kahn's message was, "The innocent should not be made to suffer," Butt said.

One of Khaalis' stated conditions for releasing the hostages is the delivery to him of seven Black Muslims convicted of murdering members of his family and others at the Hanafi Muslim Wahington headquarters on upper 16th Street N.W. in 1973. Khaalis said he wanted to mete out "justice" to the convicted murderers.

Khaalis engineered the takeover Wednesday of the B'rith headquarters on Rhode Island Avenue NW, the D.C. City Council Chambers in the District Building downtown and the Islamic Center on Massachusetts Avenue NW.

Two of the ambassadors involved in the negotiations with Khaalis have a direct tie to the Islamic Center. Zahedi is chairman and Yaqub-Kahn vice chairman of the center's board of governors.

Ghorbal's concern is for six Egyptian citizens being held hostage in the Islamic Center. As of early last night, those hostages included the center's director, Dr. Mohammad Adbul-Rauf; his wife; two sons about 12 and 14 years old; an assistant director of the other center official, Fat-hi Madi.

A spokesman for Ghorbal said the ambassador was "tired an exhausted" when he took a rest at 7 a.m. yesterday after working through the night. The spokesman said Ghorbal and the others returned to police headquarters at about 11 a.m. yesterday.

Ambassador Georges Salomon of Haiti also expressed a desire yesterday to assist in negotiations.

"If I could be of any use, it would be my pleasure," Salomon said, adding that no one had asked for his help.

Salomon like other foreign diplomatic officials, said yesterday he had taken no extra steps to secure his embassy in the wake of the Hanafi Muslim actions. "We're simply being a bit more careful," he said.

Aviezer Pazner, a spokesman for the embassy of Israel, said:"Our security remains as it has always been - quite tight. We have not received any threats (in the currents situation). We have not received any demands. Our security has always been tight because of (other) terroist threats."

Pazner said his embassy was not involved in negotiations to release the hostages.

A spokesman for the Executive Protective Service, which guards foreign diplomats in Washington, said yesterday that there had been no request from embassies for additional guards. "But we do have more officials in the Islamic Center area" of Embassy Row, said Craig Ashe.