Special Anglican Church envoy Terry Waite -- pinned in the office of an international news agency by gunfire and grenades in the latest inter-Moslem battle in west Beirut -- said today that he was making progress in his efforts to gain freedom for four American hostages but that "we have a long way to go yet."

Despite the bullets whistling and rocket-propelled grenades blowing out windows and setting fires all around, Waite appeared calm. He said that his mission was moving forward swiftly.

In a message to the hostages' families, Waite urged them to "have courage."

"Keep calm. We're making progress," Waite said in the office of The Associated Press as fighting raged in the streets below.

Waite, 46, is the emissary of Archbishop of Canterbury Robert Runcie, the spiritual head of the Church of England.

The worst fighting in months swept across the Moslem-controlled half of the Lebanese capital, trapping Waite in the AP bureau as he prepared a statement only minutes before a scheduled news conference. News agencies reported at least 23 dead and 100 injured in the fighting.

The street clashes, which pinned residents in their homes, children in schools and employes in their offices, continued unabated today. The hostilities coincided with Waite's second visit to Beirut.

The envoy confirmed that he had had more face-to-face contacts with the Islamic Jihad kidnapers and that "progress has been made in the past week." Waite returned to Beirut Tuesday afternoon after meeting with U.S. officials in London as well as with French and British government officials in Paris and London. Four Frenchmen are being held in Beirut also.

Waite said he had planned to fly to Cyprus this afternoon and then on to New York Friday for meetings with State Department officials and members of the Episcopal and Presbyterian churches.

Asked if he were more optimistic at the end of his second visit and if his efforts had moved forward, he replied: "Yes, they have. I think we have definitely taken steps forward, and I have to try to continue to be optimistic, despite this interruption."

Waite told reporters that he expected to return to Lebanon early next week. Shouting down from a window of the fourth floor of the building, Waite said that he did not think the fighting would obstruct his work.

Armor-piercing bullets chipped at the walls of the AP office, and the orange-red flash of shoulder-fired grenades lit the dark, narrow streets as night fell. Asked what his immediate plans were, Waite responded, "to take a shower."

Despite an announcement that he would go ahead with a news conference in the lobby of the Commodore Hotel, Waite was not able to leave the AP office until six hours later.

Druze chief Walid Jumblatt and Shiite leader Nabih Berri issued calls for a cease-fire tonight. Moslem radio stations said Druze gunners had surrounded two Lebanese Army barracks in west Beirut as Shiite militiamen prepared to push through Druze strongholds.

The fighting began as a quarrel between Druze militiamen and Shiite Moslem Lebanese Army soldiers last night and developed into battles with rocket-propelled grenades, machine guns and field artillery across west Beirut today.

Druze fighters of the Progressive Socialist Party went on a rampage, tearing down and burning the red, white and green Lebanese flag as preparations were under way for the celebration of Lebanon's independence day Friday. The Druze militiamen replaced the Lebanese flag with red banners bearing the sickle-and-feather insignia of their party.

The violence capped several days of mounting tension and bickering over the role of the Lebanese Army in a Syrian-sponsored constitutional reform plan. The accord, drafted in Damascus but not yet signed, has been challenged by the Christian Lebanese Forces militia and the military establishment. The accord calls for the confinement of the Lebanese Army to its barracks and its reorientation, under Syria, to the sole task of confronting Israel.