By Mohamed Sudam and Mohammed Ghobari
SANAA (Reuters) - Yemen's beleaguered president declared a state of emergency on Friday after gunmen including snipers shot dead at least 25 protesters at an anti-government rally, but denied his police forces were behind the violence.
Medical sources and witnesses told Reuters that Yemeni security forces and unidentified snipers on rooftops, who protesters said were security men, had opened fire on the crowds after Muslim prayers in the capital, Sanaa.
The interior ministry put the death toll at 25, but doctors said 42 people had died and at least 300 were injured.
President Ali Abdullah Saleh, struggling to maintain his 32-year grip on power in the impoverished Arabian Peninsula state, said the deaths happened in clashes between demonstrators and citizens at a protest camp at Sanaa University.
"I express my extreme sorrow for what happened today after Friday prayers in the university district," Saleh told a news conference in Sanaa, in which he blamed gunmen among the protesters for the violence.
"The police were not present and did not open fire," he said. "It is clear there are armed elements inside these tents and they are the ones who opened fire."
He declared a 30-day state of emergency that would give wider powers to security forces and bar citizens from bearing arms in public. A curfew was being discussed.
Yemen, home to an active al Qaeda wing, is the second country in the region to announce emergency rule this week, after Bahrain's introduction of martial law on Tuesday which was followed by a major crackdown on protesters.
It was not clear if Saleh had the military power to impose such an order, with his country deeply divided and wracked by weeks of civil disturbance that killed over 70 people.
Witnesses said security forces at first fired into the air on Friday to prevent anti-government protesters from marching out of the Sanaa University encampment, which has become the focal point of the demonstration movement.
After the initial gunfire, the shooting continued from other directions and the toll mounted.
"After the prayers finished, some fires were set in the street leading to the presidential palace. A large group of people headed that way to see what was happening and were fired on from the rooftops," said Bashir Abdullah, a witness.
The United States, which has long seen Saleh as a bulwark against al Qaeda, condemned the attack, as did France. President Barack Obama urged authorities to protect peaceful protesters and said those responsible must be held accountable.
"It is more important than ever for all sides to participate in an open and transparent process that addresses the legitimate concerns of the Yemeni people, and provides a peaceful, orderly and democratic path to a stronger and more prosperous nation," he said in a written statement.
After the deaths, however, Yemen's opposition said there was no way they could negotiate with Saleh's government.
"There is no longer any possibility of mutual understanding with this regime and he (Saleh) has no choice but to surrender authority to the people," said Yassin Noman, rotating president of Yemen's umbrella opposition group.
Tens of thousands of Yemenis had gathered in Sanaa for competing prayers before the shooting and protesters said some activists stormed nearby buildings and caught at least seven plainclothes snipers who they said had fired on the crowds.
"We arrested some snipers and we found in their possession ID cards from the presidential guard and the special guard, and we will distribute pictures of these at the appropriate time," activist Mohamed al-Sharaby said.
Saleh, also trying to cement a northern truce and quell southern separatism, has promised to step down in 2013 and offered a new constitution giving more powers to parliament. But he has refused his critics' main demand to quit immediately.
A string of Saleh's allies have recently defected to the protesters, who are frustrated by rampant corruption and soaring unemployment. Some 40 percent of the population live on $2 a day or less in Yemen, and a third face chronic hunger.
(Writing by Cynthia Johnston and Crispian Balmer, editing by Jon Boyle)