A march by leftists through the downtown area erupted into a gunbattle as police and soldiers in armored vehicles exchanged fire with about 150 anti-government marchers, leaving at least 24 dead, according to Red Cross officials.

It was the first time security units had used force to break up a demonstration since a military-civilian junta took power after the rightist regime of President Carlos Humberto Romero was ousted in a coup Oct.15.

Shooting began as a demonstration organized by the Trotskyite Feb. 28 People's Leagues moved toward the building housing the daily newspaper Prensa Grafica, strongly guarded by police since a bomb exploded there Sunday. Bombs also went off at another paper and in the Bank of America building.

Police and soldiers sealed off the area where the shooting took place, including sites where militants from another group, the Popular Revolutionary Bloc, had been holding about 250 hostages at the Labor and Economy ministries since Wednesday. Late Monday, the bloc freed about half the hostages, but kept the ministers hostage.

The gunbattle continued for five hours, and sporadic shots were heard after dusk.

A store owner who watched the fighting said security forces in armored cars turned machine guns on "groups watching from street corners." Red Cross officials said a 5-year-old boy hit by a stray bullet was among those killed.

Several hours earlier, police said Jose Antonio Castillo the National Guard's chief of investigations, was killed Sunday in Santa Ana, 40 miles west of San Salvador. The leftist Popular Liberation Forces have claimed responsibility for the death of Castillo who, they say, was responsible for the disappearance and presumed slaying of several opponents of ousted Gen. Romero.