Militia and political leaders met throughout the day here today seeking to find a lasting solution to the worst outbreak of fighting so far between pro- and anti-Syrian factions in this northern Lebanese city.

Both sides said the cease-fire declared yesterday afternoon had slowly gone into effect beginning late last night but sniper and occasional rounds of mortar fire could still be heard at midday in parts of the city where the fighting has been concentrated over the past week.

"I can say that the situation is much better than before. We have made great progress," said Rashid Karami, the former Lebanese prime minister who has tried to serve as a mediator and attempted to enlist the support of Syria's leaders to enforce the still fragile peace.

"I hope today for a complete cease-fire," he told reporters at his home here this morning, shortly before meeting with leaders of all the various pro-Syrian factions.

But later today, fighting between the two sides resumed, dashing hopes that the latest effort to end the strife was succeeding.

In Beirut, the Lebanese Army sealed off a wide section of the city's southern suburbs in search of what it called groups planning acts against state security, Reuter reported. The Army's statement did not identify the groups or indicate what kind of actions they were planning.

Security sources said the Army detained 40 to 50 people in slum quarters that were controlled by Palestinian guerrillas and Lebanese leftist militias until last June's Israeli invasion. The search, which took place in suburbs stretching from Burj al Barajinah, site of a Palestinian refugee camp, to Lailaki in the southeast, was the first large-scale security sweep in Beirut by the Army in more than two months.

Yesterday Karami returned from talks in Damascus with Syrian President Hafez Assad, accompanied by a high-ranking Syrian officer and a number of aides who are reportedly to serve as observers and see that at least the pro-Syrian factions keep the peace.

But it was still far from clear whether the loose coalition of groups opposed to continued Syrian military presence in the city was ready to respect the cease-fire.

Karami was scheduled to meet later today with Farouk Mokhaddem, a leader of the coalition of anti-Syrian factions, to discuss a peace plan apparently worked out in Damascus and endorsed today by the pro-Syrian groups.

The plan calls for the creation of a 400-man peace-keeping force made up of militiamen drawn from all the warring factions, observers stationed in key points to help police the cease-fire, the gathering of all weapons and disbanding of all militia groups and the deployment of Lebanese gendarmes and policemen within the city.

It is not known whether Mokhaddem and his allies will accept the plan. They have been insisting on the withdrawal of all Syrian forces from Tripoli and their replacement by units of the Lebanese Army as peace-keepers.

Syrian troops are stationed in Tripoli as part of the Arab peace-keeping force sent to Lebanon in 1976 to end the civil war then raging in the country. There are also 3,500 Lebanese Army troops based here but they have not left their garrison since the outbreak of the fighting in late November.

Yesterday Karami flatly rejected Mokhaddem's demand for the withdrawal of Syrian forces. Meanwhile, the leader of one pro-Syrian faction, Nasib Khateb, said today that the Lebanese Army could not be deployed until the central government reached an agreement with Syria on the withdrawal of all its troops from the country.

The conflict has taken more than 150 lives and wounded scores of others.