MANILA, JAN. 22 -- Government troops opened fire with automatic weapons today on thousands of farmers and leftist demonstrators, killing at least 12 protesters and wounding 98 others in the bloodiest street violence seen here in several years.

After the shootings, policemen riding in jeeps chased down smaller groups of demonstrators and kept them from regrouping by lobbing tear gas canisters and firing automatic weapons into the air.

The violent confrontation, and threats of retaliatory protests by irate leftist leaders here, posed a potentially devastating new crisis for President Corazon Aquino 11 days before a scheduled nationwide referendum on a new constitution that she hoped would end this country's political turmoil.

In the first political fallout from today's violence, communist rebels and government negotiators announced that peace talks aimed at ending an 18-year insurgency had broken off indefinitely, and that a 60-day cease-fire would not be extended after it expires Feb. 7.

A communist negotiator said today's killings were part of "the pattern of military action" to destabilize the situation.

The shooting began when a crowd of about 10,000 demonstrators for a variety of causes including land reform surged against a line of policemen holding riot shields and blocking the entrance to Malacanang, the presidential palace. When the 300 unarmed policemen retreated behind their shields, a line of marines behind them fired into the crowd with M16 rifles.

Leftist leaders and some of the victims interviewed in city hospitals said the shooting was unprovoked and came without warning. But according to witnesses' accounts and television film footage of the incident, some protesters threw stones and bottles at the police positions. Some of the demonstrators carried pipes and crude clubs with nails driven through them.

In a terse televised speech after an emergency late-night Cabinet meeting, Aquino launched an independent, nongovernmental investigation of the incident and announced that the director of the capital command police forces, Gen. Ramon Montano, would be placed on a leave of absence during the probe.

Aquino, visibly tired, also warned her countrymen to expect more violence in the days leading up to the Feb. 2 referendum. "In the period before the plebiscite, attempts to destabilize the government and defeat our democratic aims will intensify," she said.

There have been several other violent incidents in recent days, leading to speculation here that the forces arrayed against Aquino, from the far left to the far right, were engaged in a last-ditch campaign to create a climate of instability here either to disrupt the planned plebiscite or provide the pretext for a military coup.

Earlier this week, for example, explosions damaged three bridges in Iloilo, about 300 miles south of Manila and not far from where the president is scheduled to campaign this weekend for the constitution.

Police and military officials charged today that "provocateurs" had joinws the protesters and provided the crude weapons they carried. Leftists noted that the police guarding the street leading to the palace had removed the barbed-wire barricades that were erected over the weekend.

Medical records at the Far Eastern University Hospital identified one of the dead demonstrators as Roberto Yumol, and said he had in his pocket an identification card from the military's Constabulary Intelligence Service. The records listed his address as Camp Crame, a military barracks.

Various eyewitnesses, including newspaper reporters, said that, when the soldiers fired, they were clearly aiming straight into the crowd. Luis Pineda, a member of the Health Alliance for Democracy, one of the groups participating in the protest, said the marchers were still about 55 yards away from Mendiola bridge, marking the entrance to the palace grounds, when the shooting erupted.

"We didn't provoke them because we were too far away," he said during an interview at Philippine General Hospital.

But officials offered a conflicting version of events.

"These demonstrators attacked the police column," said police Capt. Eduardo Mediavillo, who was on the scene. "They hurled stones and pillboxes . . . . The military came to our rescue. We were outnumbered. Some of the demonstrators fired at the ranks of the police. The police don't have guns. If the Army started to shoot, it was to protect the ranks of the police because we were outnumbered," he said.

Mediavillo said the police received intelligence warnings that the ranks of the protesters had been infiltrated by members of the Communist Party of the Philippines and their military wing, the New People's Army.

About 30 minutes after the violent dispersal at the palace, about 3,000 demonstrators regrouped in the post office square about a mile away, Washington Post special correspondent Gregg Jones reported.

Minutes later, troops and armed plainclothes policemen arrived and began walking slowly toward them, Jones reported. The protesters responded with a hail of rocks and bottles aimed at the police and passing cars.

The police then drove toward the crowd and several tear gas canisters were fired toward the demonstrators. Simultaneously, the plainclothes policemen opened fire with their automatic rifles, aimed only a few feet above the heads of the fleeing protesters.

Today's shootings marked the bloodiest street protest in the capital since 11 persons were killed at the same spot during a September 1983 demonstration a month after the assassination of the president's husband, former senator Benigno S. Aquino Jr.

Most of the victims in today's violence were shot in the arms and legs. Many had been shot through the back, apparently as they were trying to flee. Some of the dead had been shot in the head.

A nun who identified herself as Sister Theresa from St. Joseph's College, which is near the presidential palace, said "The bullets were raining, they were just raining. This is the first time this happened, even in Marcos' time."

Former Philippine president Ferdinand Marcos, in exile in Hawaii, blamed Aquino personally for the shootings. Marcos said civil war "may erupt at any time" because of what he called the "vicious and ruthless killing of innocent farmers," Washington Post special correspondent Walter Wright reported from Honolulu.

Marcos said he and his wife Imelda and other family members in Honolulu wept for the "farmer heroes" when they saw television footage of the clash.