A gunmen opened fire on worshippers in a Yemeni mosque during Friday prayers killing eight and wounding dozens in a predominantly Shiite town north of the capital, a security official said Sunday.

The official said the attacker just walked into the mosque during the weekly sermon and opened fire with his assault rifle. The gunmen is now in custody.

The official spoke on condition of anonymity because he was not authorized to speak to the press.

The attack took place in the town of Kohal, in Amran, a predominantly Shiite province just north of the capital San'a.

On May 2, a booby trapped motorcycle exploded outside a Shiite mosque in the northern town of Saadah, near the Saudi border, as worshippers were leaving, killing 18.

That area is the site of a rebellion by Shiite Muslims of the al-Zaydi sect that erupted in 2004 and has since killed thousands. It is not immediately clear if the Amran attack, which happened 150 kilometers to the south, was connected.

The government of predominantly Sunni Yemen blamed that mosque bombing of the on rebel leader Abdel-Malek al-Hawthi who is leading the rebellion. But al-Hawthi denied involvement.

The Shiite rebels accuse the government of corruption and of being too closely allied with the West. The government accuses al-Hawthi of sedition, forming an illegal armed group and inciting anti-American sentiment.

Attacks on mosques were once rare in Yemen and analysts said the targeting of a mosque is a dangerous escalation in the northern conflict.

In a separate incident, a police official said that two Katyusha rockets were fired at an oil refinery in the Yemeni port of Aden but there was no word of causalities.

The official said that al-Qaida is believed to be behind attack.

Yemen is the ancestral homeland of al-Qaida leader Osama bin Laden. The group has active presence in Yemen despite government efforts to destroy it.

The group was blamed for the 2000 bombing of the USS Cole destroyer in the Yemeni port of Aden that killed 17 American sailors and an attack on a French oil tanker that killed one person two years later.