The United Nations said 52 detainees were among the dead, with a further 68 still missing.

More than 100 people are believed to have been killed in an air strike by the Saudi-led military coalition on a detention centre in Yemen, the International Committee of the Red Cross said Sunday.

The coalition said it targeted a facility run by the Huthi rebels that "stores drones and missiles", but the rebels said the attack had levelled a building they used as a prison.

The United Nations said 52 detainees were among the dead, with a further 68 still missing.

"Casualties are most likely to increase as rescue efforts are still ongoing," it said.

The ICRC rushed to the scene in the city of Dhamar with medical teams and hundreds of body bags.

"The location that was hit has been visited by ICRC before," Franz Rauchenstein, its head of delegation for Yemen, told AFP from Dhamar. "It's a college building that has been empty and has been used as a detention facility for a while."

"What is most disturbing is that (the attack was) on a prison. To hit such a building is shocking and saddening - prisoners are protected by international law."

Rauchenstein said that over 100 people were estimated to be dead, and that at least 40 survivors were being treated for their injuries in hospitals in the city, south of the capital Sanaa.

ICRC teams collecting bodies were also "working relentlessly to find survivors under the rubble", he said, but cautioned that the chances of finding any were very slim.

Footage obtained by AFP showed heavy damage to the building and several bodies lying in the rubble, as bulldozers worked to clear away huge piles of debris.

The coalition intervened in 2015 to support the government after the Iran-aligned Huthis swept out of their northern stronghold to seize Sanaa and much of Yemen -- the Arab world's poorest nation.

Fighting since then has already claimed tens of thousands of lives and sparked what the United Nations calls the world's worst humanitarian crisis.

"Staggering" casualties

The UN's humanitarian coordinator in Yemen called Sunday's air strike "horrific" and said aid groups had been forced to divert critical medical supplies, intended for treating cholera outbreak, to Dhamar hospitals.

"We have no choice," Lise Grande said. "The scale of the casualties is staggering."

Both sides stand accused of actions that could amount to war crimes.

The coalition has been blacklisted by the UN for the killing of children, while Saudi Arabia and its allies accuse the Huthis of using civilians as human shields in densely populated areas.

Before the ICRC's comments, the coalition had insisted the strike was conducted against "a military compound which was a legitimate military target".

It said secondary explosions indicated the building was used to store weapons and that the Huthis were masking its identity by "claiming it was a secret prison".

"This is a traditional Huthi tactic and a violation of the laws of armed conflict. This site was not registered with the United Nations" and was not on the coalition's "no strike list" of sites provided by the UN and other agencies, coalition spokesman Turki Al-Malki said in a statement.

The coalition said it "took all precautionary measures to protect civilians".

But Huthi television channel Al-Masirah said dozens had been killed and wounded in seven air strikes that hit the building.

"The enemy targeted prisoners on purpose in Dhamar, many of whom were preparing to be released under a prison swap deal," Huthi rebel chief Abdelmalek al-Huthi said in a televised speech on Sunday.

The UN's Yemen envoy Martin Griffiths said Sunday's deaths were a "tragedy".

"The human cost of this war is unbearable," he said. "We need it to stop. Yemenis deserve a peaceful future."

The attack in Dhamar comes weeks after a new front opened in Yemen's complex war, pitting two of Riyadh's allies against each other in a struggle for control of the south.

The United Arab Emirates, a key member of the coalition backing the Yemeni government, has also trained and supported secessionists who seek an independent southern Yemen.

The southern forces last month seized control of the interim capital Aden in the south, in a see-sawing battle with government troops that has drawn warnings that the country could break apart entirely.

The government has accused the UAE of backing a "coup".

Analysts say the fight for the south is a key test for Saudi Arabia, which hopes to mediate a ceasefire so it can focus on its main mission of battling the Huthis who are aligned with its arch foe Iran.