Suleiman Ali Qaddeh huddled with his family and neighbors around a charcoal brazier in his small apartment located on the front line of warfare between opposing Moslem militia factions in this northern seaside city.

"We really don't understand why there is still fighting," said Qaddeh, as gunfire crackled sporadically. "They meet and they say everything is settled and then shooting starts again."

Qaddeh, 50, a laborer with a family of 11, has lived like a prisoner in his own home, without water or electricity and with food brought by militiamen racing through the streets to avoid sniper bullets.

"Those who can afford it leave, and those who cannot stay," he said, explaining why he has stayed in his half-deserted neghborhood.

For nearly two months, Tripoli has been the scene of intermittent but worsening strife that has taken at least 180 lives. The International Red Cross in Geneva estimates that 25,000 have fled the fighting. Cease-fires announced in the afternoon are regularly broken by nightfall, and not even the Syrian Army that is dominant in the area seems able to enforce its will.

The second largest city in Lebanon, this ancient port is the current battleground of all the sectarian and political factions that have struggled for power in Lebanon over the past eight years--Moslem leftists and Christian rightists, Sunnis, Shiites and Alawites, Syrians and Palestinians, pro-Iraqi Baath socialists and Moslem fundamentalists inspired by the Iranian Islamic revolution.

"It is part of the general ordeal of Lebanon," said a Christian professor from the local university. "The worst thing is the fragmentation of political groups."

Tripoli seems similar to Beirut before the Israeli invasion of last summer. Militiamen of uncertain affiliation in beat-up cars and vans wave rifles and rocket launchers out the window as they try to offer protection to foreign correspondents visiting their turf.

Some are helpful, instructing visitors on how to avoid sniper fire. Others are querulous and unpredictable, tearing out pages from reporters' notebooks after first agreeing to be interviewed.

Feudal-like chieftains of the various factions sit in parlors fingering worry beads as they test the changing political winds and reorder their temporary alliances.

As in Beirut, there are also struggles for leadership within factions, whose complexity confounds an outsider.

The political turmoil renting Tripoli is similar to that in Beirut in that one of its primary causes is the waning of Syrian and Palestinian influence after seven years of a strong Syrian Army presence.

Local Lebanese factions who drew their arms, funds and political muscle from that presence are fading with it, while new ones are struggling to fill the vacuum.

A similar shift took place in Beirut last summer as the Israeli invasion smashed the Palestinian, Moslem leftist and Syrian hold over the politics of the capital, and the Christian Lebanese Forces, led by militia leader Bashir Gemayel and backed by Israel, took the reins.

Here in Tripoli, however, the main sectarian division is not between Moslems and Christians but between two Moslem sects, Sunnis and Alawites. The former constitute almost 90 percent of the city's 500,000 residents, while the latter community, living mostly in the besieged district of Baal Mohsen, number only 50,000.

Neither sect, however, is totally united and both sides deny the conflict is primarily sectarian.

Many of Tripoli's Alawites are relatively recent immigrants from neighboring Syria, where this secretive Moslem sect is centered. Syria's rulers are Alawites.

Today, the Alawite minority here is worried that the changing political equation in Beirut also spells their likely expulsion from Lebanon, just as is happening to other foreigners without Lebanese passports or residence permits.

This fear appears to be shared by even those Alawites siding with the Sunni militias against the Syrians and their own brethren. Qaddeh and his family, for example, are Alawites living in a predominantly Sunni neighborhood. He and his Alawite neighbors were quick to assure visitors that they had lived in Lebanon for decades and are now Lebanese citizens.

For Qaddeh, the fighting in Tripoli has nothing to do with the underlying Sunni-Alawite tension but is largely an intra-community power struggle. "The Alawites up there," he said pointing toward Baal Mohsen, "support Syria and their leader is Ali Aiid. If there are Alawites who don't follow him, he kills them. But there are Alawites not under his control living all over the city fighting against him."

While Syrian influence is receding, it is still the key because of the 25,000 to 35,000 Syrian troops in northern and eastern Lebanon. They belong to the old Arab peace-keeping force brought in to end the 1975-6 civil war.

Syrian Defense Minister Mustafa Tlas, who engineered the last cease-fire on Dec. 24, returned Thursday to try to arrange another one.

His return came amid reports in the Beirut press that Syria is demanding, in return for their influence and troops to impose another cease-fire, a promise from Lebanon's central government to give citizenship to Alawite immigrants from Syria who have settled in the Tripoli area. Yet the conflict here involves not just Syria and its local allies but a struggle among Sunni warlords. The chief is Rashid Karami, 61, who served as premier nine times and is pro-Syrian.

Karami's six-floor apartment overlooking Tripoli's fairgrounds, where a Syrian Army unit is based, serves as the main meeting site for the Syrian-backed factions: the Arab Democratic Party, whose Syrian-armed militamen are doing most of the fighting in Baal Mohsen, the old Nasserite and leftist National Movement coalition and the Lebanese Baath and Communist parties.

But Karami's influence and leadership over the Sunni community is being challenged by Farouk Mokhaddem, who was the Sunni leader until the Syrians dismissed him during the civil war.

Mokhaddem, 47, who spent four years in self-imposed exile in Paris, now heads a faction known as the October 24 Movement, whose youthful militiamen are leading the fight in Qaddeh's district. Mokhaddem has put together a coalition of Islamic fundamentalists and pro-Iraqi Baathists known as the Popular National Resistance that opposes any Syrian troops in the city and wants the Lebanese Army to take over.

An engaging politician, Mokhaddem over the years has received backing from Palestinians, Libyans, Syrians, and Christian Lebanese Forces and is now said to be aided by the Iraqis and the central government in his efforts to press a Syrian withdrawal.