At least 22 members of pro-government forces have been killed in a rebel attack on a mosque inside a military base in Yemen, according to medical sources.

Two missiles fired by Houthi rebels on Friday hit worshippers in Sirwa, western Marib province.

The first missile hit the mosque inside the Kofal military camp during prayers, while the second struck during rescue efforts, local sources said.

Dozens of people were also wounded in the attack, which was claimed by a rebel news agency.

READ MORE: Yemen's other refugee crisis

Most of Marib is under control of forces loyal to the Saudi-backed government of President Abd-Rabbu Mansour Hadi.

In 2014, Houthi fighters overran Yemen's capital Sanaa and forced the Saudi-backed government of President Hadi to flee into exile.

An Arab coalition was assembled by Saudi Arabia in 2015 to fight the Houthis and troops loyal to former President Ali Abdullah Saleh who have fired missiles into neighbouring Saudi Arabia.