Yemeni President Ali Abdullah Saleh has broadcast an audio message saying he is well, after a rocket attack hit the mosque in his compound in the capital, Sanaa.
Mr Saleh was reported to have been wounded in the first attack that's directly targeted him in escalating violent unrest.
Seven people were killed and the prime minister and the speaker of parliament were among several injured reports the BBC.
The attack came amid huge demonstrations and continuing fighting between government and armed troops.
Mr Saleh has blamed the attack on an outlaw gang of his tribal foes - an accusation denied by the powerful Ahmar family.
Meanwhile, the European Union and the United States have called for an immediate ceasefire.
Mr Saleh received treatment in a military hospital, after at least two shells hit a mosque in the presidential compound.
The extent of his injuries is unclear, although various reports say he received scratches, or was hit by shrapnel in the head or neck.
The United States has sent an envoy to the Gulf to discuss ways of stopping the fighting, which has brought Yemen to the brink of civil war.
More than 350 people have been killed since the uprising started in January, but least 135 of them in the past 10 days.
Mr Saleh is under pressure to sign a deal that would see him hand over to his deputy in return for an amnesty from prosecution.
He has agreed to sign on several occasions, but then backed out.
Mr Saleh, 69, has been in power since 1978.