A top Moslem leader of this northern Lebanese city announced on return from talks with Syrian leaders in Damascus today that a cease-fire in the six-day-old fighting between pro- and anti-Syrian factions here would take effect immediately.

But more than an hour after he made the statement to a group of western reporters, the sound of automatic rifles and artillery shells could still be heard in the districts where the warfare has been concentrated and most of the estmated 150 to 200 deaths have occurred.

This evening, state-run Beirut Radio said the fighting continued.

Residents of this ancient seaside port city, Lebanon's second largest, began today to emerge from their homes and shelters to buy food, despite the crackle of gunfire and blasts of mortar and artillery rounds.

Farouk Mokaddem, chief of the anti-Syrian militia groups, said the Syrian Army shelled the city all day yesterday and heavily last night. He accused the Syrians of committing "genocide in steps" and said 100 civilians and 10 of his militiamen had died during the past 24 hours.

Yesterday, Lebanese police sources estimated 40 persons had been killed while other reports put that death toll as low as 14.

"What is happening in Tripoli is aimed at undermining our sovereignty and putting pressure on President Amin Gemayel," Mokaddem said in an interview at his heavily guarded headquarters in the downtown area.

A diametrically opposed version of events came from the pro-Syrian ex-premier, Rashid Karami, who accused "agents of Israel" of stirring up the trouble among Tripoli's dozen or so sectarian or political armed factions.

Surrounded by several dozen factional leaders at his apartment, Karami said he was "satisifed" that he had found a solution to the warfare as a result of his talks with Syrian President Hafez Assad and Foreign Minister Abdul Halim Khaddam last night in the Syrian capital.

Khaddam said the Syrians had promised to help arrange a new cease-fire and make it effective this time, noting the presence of a high-ranking Syrian officer in the city. A truce that followed a Dec. 24 intervention by Khaddam broke down six days ago.

Khaddam also declared the Syrians would not withdraw their troops from the city, as anti-Syrian factions here have been demanding, because they were "legal forces."

"We know one aim of the struggle here is to make the Syrians withdraw from Tripoli," he said, referring to the demands and efforts of the anti-Syrian factions led by Mokaddem. "The Syrians will withdraw when the interest of Lebanon is for them to withdraw and by the demand of the official power in Lebanon."

Syria has had 25,000 to 30,000 troops stationed inside Lebanon as the bulk of an Arab peace-keeping force since the civil war in 1975-6. While those stationed in and around Beirut were forced out by the Israeli Army last summer, there are still many thousands in Lebanon's eastern Bekaa Valley and here in the north.

The Lebanese government has, in fact, called repeatedly for the withdrawal of all foreign forces, Syrian, Israeli and Palestinian, and is now engaged in U.S.-sponsored negotiations with the Israelis to arrange for the departure of their troops simultaneously with the Syrians'.

Soldiers of Syria's elite special forces, under the command of Rifaat Assad, brother of the Syrian president, were in evidence both south and east of Tripoli today, manning road checkpoints.

Mokaddem, who leads the anti-Syrian National Resistance Movement made up principally of Sunni Moslems, accused the Syrians of carrying out the heavy artillery shelling of the city during the past two to three days.

Many residents of Tripoli interviewed today apparently believe that the Syrians were responsible for the sudden deterioration in the situation and the fighting which began seven weeks ago.

Mokaddam said Syrian forces and their local supporters had tried to expand their area of control beyond the Bal Mohsen district in the old city but had been repulsed by his militiamen.

"Those bombing the city are trying to expand the area of combat," he said. "The people in arms have replied according to their very modest means. We have been able to prevent the deployment of their forces."

But other sources in the city said it was Mokaddem's militiamen, seeking to oust the Syrians from Bal Mohsen, who provoked the latest fighting--which has coincided with the Lebanese-Israeli negotiatons.

Tripoli appeared not heavily damaged despite the Syrian Army shelling of many sections.

Some buildings in the city center bore shell holes. Bar Mohsen, reportedly the heaviest hit district, could not be visited by reporters because of continuing fire.