Ali Maresh al-Akram, 23, threw two grenades into the mosque in Khamer Hoth, in the province of Omran, some 80 kilometres north of Sanaa. One of the grenades failed to explode.
He was described as “mentally unstable,” by an unidentified security source. al-Akram was arrested shortly after the attack.
Random attacks in Yemen are increasingly common.
On 20 July a man armed with a machine gun fired at people in a Koranic school in Lahaj, 300 km south of Sanaa, killing nine. In 2001, two armed men killed six people and wounded 10 others in another attack on a mosque in Yemen.
With more than 50 million firearms in private hands - about three for every Yemeni - disputes can easily turn deadly. Many are rooted in tribal loyalties and divisions.