Shooting broke out yesterday as police tried to disperse 1,000 antigovernment demonstrators at a rally in a downtown square. Authorities said two persons were killed and at least 30 were wounded.

Witnesses said sharpshooters on the roof of the transit police building fired into the crowd, which was demanding the resignation of President Carlos Humberto Romero.

Reporters on the scene said the shooting started after police were unable to stop the demonstrators rallying for a march in downtown Cuscatlan Park. The protesters carried banners that identified them as belonging to the left-wing Popular Revolutionary Bloc.

Leaders of the group said police and detectives in plainclothes opened fire. Police refused comment. Witnesses said some of the protesters drew pistols and returned the police fire.

ABC radio correspondent Kathy Barber Hersh was hit by bullet fragments in her right arm and was to be evacuated to Miami, according to her husband, a camerman for United Press International television news.

The heavy shooting in the Salvadoran capital lasted 10 minutes, witnesses said.

It was the bloodiest encounter since police shot into a mob in front of the National Cathedral last May, killing 25 persons and wounding more than 60. After that shooting, which drew international criticism, police and Army units generally had avoided confrontations with demonstrators.