Christian, Moslem and Druze gunners unleashed one of the heaviest sustained barrages of shelling in Lebanon's 10-year-old civil war last night and today, killing more than 40 people and wounding 150 in an outbreak of vengeance that engulfed the capital, residential areas outside it and remote mountain villages beyond.

To the north, in Tripoli, Lebanon's second-largest city, a car bomb rocked a crowded neighborhood, killing 45 people and wounding 85. The car exploded just three minutes after a stick of dynamite had been hurled from another car, apparently to draw curious residents who were then blown up by the booby-trapped vehicle.

An anonymous caller told a news service in Beirut that the Tripoli bomb had been intended to insure that "no Moslem fundamentalists will continue to live on Lebanese soil," The Associated Press reported. The bombing was in a neighborhood where a leading Sunni Moslem fundamentalist leader lives.

The Tripoli car bomb was the fifth in a week in Lebanon. Two last week killed 68 people in Christian areas of Beirut and its suburbs and two on Monday killed 29 in Moslem west Beirut, in what many residents of the shell-shocked capital are calling "the war of the car bombs."

The widespread fighting between Christian militias on one side and Moslems and Druze on the other came as Lebanon's government and its "national unity" Cabinet retreated farther from sight and the combatants, in addition to blaming each other, accused Israel and Syria of stirring hostilities for their own advantage.

Last night and today, rockets, missiles and thousands of howitzer shells crashed into Beirut keeping residents huddled in basements, corridors and stairwells.

Christian mountain summer resorts and the coastal stretch of Christian beaches north of Beirut were shelled from Druze and Moslem positions in the Syrian-controlled hills.

Nabih Berri, leader of the Shiite Moslem Amal militia, whose home in the densely populated Barbour quarter of west Beirut came under an intense barrage of mortar fire, called for a "military showdown," which he described as the "only option against Israel's agents" -- a reference to Christian militias.

The executive committee of the Lebanese Forces, the main Christian militia, in a broadcast at the height of the shelling last night, appealed to Moslems "with all sincerity and goodwill to respond and . . . end the war," but it warned that there will be "no dialogue in the shadow of the gun and under pressure."

Shiite Amal militiamen clearing the rubble during a brief afternoon lull in the fighting, however, said they did not want a cease-fire. Members of a committee assigned to monitor and implement cease-fires complained that they could not locate their Amal colleagues and political sources said Amal was "not interested in a truce" despite the overnight battering.

"We don't want peace with the Lebanese Forces. We are with the Christians but against the Lebanese Forces," said an Amal fighter, who gave his name as Abu Mahmoud. He said he had helped put out the fires in Christian homes in Barbour during the night.

The Lebanese Forces blamed Amal for the eruption of fighting, accusing it of desperately trying to dominate Moslem ranks for its own political purposes and to crush the Christians.

"If it is aimed at displacing the Lebanese, particularly the Christians, it would be a war against us and we shall respond with all defensive methods," a spokesman for the Christian militias warned.

The impoverished Shiite slums south of Beirut, the mainly Moslem district of Corniche Mazraa and Berri's neighborhood were battered with rockets and mortars, which wrecked homes, burned at least 50 cars, ripped branches off trees and left power and telephone cables dangling.

The narrow maze of streets around Berri's home was potholed and devastated, strewn with smashed cars and shattered glass. An elementary school was a pile of bricks and mangled steel.

"May God damn them for trapping women and children like this," said a militiaman.

A Christian doctor, Jacques Karam, who lived in Berri's neighborhood, said he had never spent a night like this one.

"I can say that after 11 years of war in Lebanon, this was the worst night and day," he said. "I had to spend eight hours in the shelter. Even during the Israeli invasion, there was no need to hide for so long."

Atef Jaafar, a Moslem resident of Barbour, said there was not one building in his area that was not hit by two or three shells.

The Christian Phalange Party's radio station said 20 shells slammed into the Christian Maronite village of Tannourine, 25 miles northeast of Beirut, from territory controlled by Syrian troops.

The Druze radio station said Lebanese Army tanks were moving on the Suq al Gharb axis in the mountains southeast of the capital. Western military observers in Christian areas confirmed that Lebanese Army 155mm- and 130mm-guns had opened fire from mountain positions after the Defense Ministry at Yarze was hit during the night.

The Christian ski resort of Faraya, the village of Kartaba and the Christian port of Jounieh, all north of Beirut, came under intense shelling from Druze artillery.

Druze radio said the long-range artillery fire against Shiite and Druze areas came from Christian areas northeast of Beirut and the hills around Baabda, seat of the presidential palace.

Lebanon's Army has U.S.-supplied M48 tanks and heavy artillery.

The Druze Progressive Socialist Party of Walid Jumblatt has an estimated 90 Soviet-made T54 tanks under its control. Soviet sources said Druze fighters go on intensive training courses in the Soviet Union and "know how to handle Soviet weaponry well."

The Druze recently opened their own seaport in Khalde, south of Beirut, and have been receiving arms directly from the Soviets and others. Previously, their shipments had to come overland through Syria and were subject to the whims of the Damascus regime.

The Lebanese Forces have a fleet of French AMX tanks, Super Shermans from the Israelis, American M48s and some T54 tanks captured from the Syrians in 1978.

This latest round of fighting, although expected by many after two weeks of balking by political leaders, has been of such wide dimensions that many observers say it is difficult not to see outside involvement -- whether Syrian, Israeli, Arab or someone else.

Moslem leaders have insisted that Israel stands to benefit the most. Some analysts argue that the escalation is a way of "pressuring all parties into submission."

The car bomb in Tripoli, apparently directed against an area where the Sunni Moslem leader of the Jundallah (Soldiers of God) fundamentalist organization lives, has raised questions about possible Syrian involvement.

Jundallah, funded and partially equipped by Yasser Arafat's mainstream Fatah organization, is a close ally of the Sunni fundamentalist Tawheed (Islamic Unification) movement, which battled in Tripoli against the Syrian-backed Arab Democratic Party and its militia.

Christian and Moslem leaders in the past few weeks have come out with sharply contrasting positions on political reforms. Berri's large Shiite community is pressing hardest for a bigger share of Lebanon's power structure, now dominated by Christians. Druze leader Jumblatt has been the most outspoken of Moslem leaders in rejecting compromise with the beleaguered regime of President Amin Gemayel, a Christian.