SANAA, Yemen -- Yemeni government snipers firing from rooftops and houses shot into a crowd of tens of thousands of anti-government demonstrators on Friday, killing at least 40 people and injuring hundreds demanding the ouster of the autocratic president.
The protest in the central square was the largest yet in the popular uprising that began a month ago -- and the harsh government response marked a new level of brutality from the security forces of President Ali Abdullah Saleh, a key -- if uneasy -- ally in the U.S. campaign against al-Qaida who has ruled Yemen for 30 years.
Saleh declared a nationwide state of emergency hours after the shootings in the capital, formally giving the security forces a freer hand to confront the demonstrators. There was no word on how long the emergency laws would remain in place.
Dozens of enraged protesters stormed several buildings that were the source of the gunfire, detaining 10 people including paid thugs who they said would be handed over to judicial authorities.
Demonstrators have camped out in squares across Yemen for over a month to demand that Saleh leave office. Security forces and pro-government thugs have used live fire, rubber bullets, tear gas, sticks, knives and rocks to suppress them. The protesters say they won't go until Saleh does.
"They want to scare and terrorize us. They want to drag us into a cycle of violence -- to make the revolution meaningless," said Jamal Anaam, a 40-year-old activist camping out in the square that the protesters call "Taghyir Square" -- Arabic for "Change."
"They want to repeat the Libyan experiment, but we refuse to be dragged into violence no matter what the price," he said.
Before the shooting Friday in Sanaa, a military helicopter flew low over the square as protesters arrived from prayers. Gunfire soon erupted from rooftops and houses above the demonstrators, where witnesses said beige-clad elite forces and plainclothes security officials took aim.
A state TV report denied government forces were behind the gunfire.
Police used burning tires and gasoline to make a wall of fire that blocked demonstrators from fleeing down a main road leading to sensitive locations, including the president's residence.
Panic and chaos swept the square, where dozens of dead and wounded sprawled on the ground. Witnesses said the snipers aimed at heads, chests and necks. Protesters carried their friends, scarves pressed over bleeding wounds.
"It is a massacre," said Mohammad al-Sabri, an opposition spokesman. "This is part of a criminal plan to kill off the protesters, and the president and his relatives are responsible for the bloodshed in Yemen today."
Saleh announced a press conference later Friday. Opposition groups also planned an emergency meeting to discuss their next steps.
Before the protests, Yemeni elite forces fortified the president's residence, the Interior Ministry, the Defense Ministry and the building housing the ruling party, apparently fearing demonstrators would storm those areas, as they have done elsewhere in uprisings across the Middle East.
Doctors at the makeshift field hospital near the protest camp at Sanaa University confirmed at least 40 dead, three of them children. They spoke on condition of anonymity because they were not authorized to speak to the media.
Interior Minister Gen. Mouthar al-Masri, who is in charge of internal security forces, put the number of dead at 25 and the injured at 200.
Medical officials and witnesses say hundreds were wounded in Friday's violence, which marks a dramatic escalation of the crisis that has engulfed Yemen.
The protests are just one of the problems in this extremely poor, tribal country. Saleh's weak central government also faces one of the world's most active al-Qaida branches, a secessionist rebellion in the south and a Shiite uprising in the north.