BEIRUT, Lebanon (AP) _ Syrian and Christian gunners blasted residential neighborhoods in vicious all-night shelling duels around the Beirut area, killing 21 people and wounding 82, police said today.

Ten of the victims died and 40 were wounded in the underground shelter of an apartment building in Beirut's Christian suburb of Fayadiyeh, a police spokesman said. It was hit by a salvo of three 240-mm mortar rounds fired by Syrian gunners.

The latest casualties raised the overall casualty toll to 537 killed and 2,266 wounded in a 20-week-old confrontation between Gen. Michel Aoun's 20,000 mainly Christian troops and the 40,000 Syrian soldiers in Lebanon.

The police spokesman, who cannot be named in line with standing regulations, said the three mortar rounds pierced the parking lot of the 10- story apartment building and exploded in the underground shelter.

''Part of the building collapsed on the shelter, and victims were buried under the rubble,'' he said.

Several ranking officers of Aoun's army live in Fayadiyeh, a wealthy suburb three miles east of Beirut.

The spokesman said soldiers evacuated most of the casualties in armored personnel carriers. ''It was very risky for ambulances to operate due to intensity of the barrage,'' he said.

He said most of the casualties, although civilians, were taken to the military hospital in Christian east Beirut.

The fighting started about 10 p.m. Friday, sending civilians to basements and underground shelters.

The police spokesman said the barrage began as ''kind of the usual artillery exchange,'' with Syrian howitzer batteries targeting the Christian- controlled coastline north of Beirut to blockade shipping and Aoun's gunners retaliating with attacks on Syrian emplacements in west Beirut.

He said the Syrians ''escalated the exchange by deploying the 240mm mortars in the battle and targeting the shelter.''

Aoun's gunners and their right-wing Christian militia allies, the Lebanese Forces, entrenched in the Christian enclave ''responded heavily,'' the spokesman added.

He said Christian militia gunners fired their Soviet-made multi-barrelled rocket launchers on residential districts in Moslem west Beirut, spitting out 40 rockets per minute.

The Christians control a 28-mile stretch of Lebanon's 130-mile Mediterranean coast north of Beirut.

The Christian enclave, home for about 1 million people, has been besieged by Syrian and allied Moslem forces in retaliation for a blockade by Aoun's forces of ports run by Syrian-backed militias south of Beirut.

An Arab League committee trying to mediate an end to the fighting said earlier this week it had reached an impasse and blamed Syria for blocking its 2-month-old mission.

Aoun, 54, a Maronite Catholic, and other Christian leaders accuse the Syrians of betraying a 1976 peacekeeping mandate from the 22-nation Arab League by supporting Moslems against Christians in the 14-year-old civil war. Moslems are seeking a greater share of political power in Lebanon, which has been dominated by the Christian minority.