A humanitarian truce will begin in Yemen on Friday to allow urgently needed aid to reach civilians in the war-torn country facing the threat of famine, the United Nations said.

The pause in fighting is scheduled to go into effect at 23:59 local time (2059 GMT) on Friday until the end of Ramadan on July 17.

The announcement came eight days after the United Nations declared Yemen a level-3 humanitarian emergency, the highest on its scale, with nearly half of the country's regions facing a food crisis.

"It is imperative and urgent that humanitarian aid can reach all vulnerable people of Yemen unimpeded and through an unconditional humanitarian pause," U.N. spokesman Stephane Dujarric said Thursday.

U.N. Secretary-General Ban Ki-moon has received assurances from exiled President Abedrabbo Mansour Hadi, the Huthi rebels and other parties that they will respect the pause, he added.

But the U.N. spokesman did not specifically state that a Saudi-led coalition which has been bombing Yemen for over three months had pledged to abide by the pause.

"We have the expressions necessary from all parties to announce the start of this pause on Friday, July 10th," said Dujarric.

"It will be very clear come Friday evening whether this pause is respected."

Yemen slid deeper into turmoil when the Saudi-led coalition launched air strikes in late March to stop an advance by the Iran-backed Huthi rebels who drove the president into exile.

Saudi Arabia and its Gulf allies are demanding that the Huthis pull back from territory seized in their offensive and that Hadi be restored to power.

-No bombing, no shooting-

The U.N. spokesman highlighted that Hadi had told the Saudi-led coalition that he accepts the pause "to ensure their support and collaboration."

Discussions on the truce have been tough going for days, with Hadi and the Saudi coalition putting forward a list of demands before agreeing to the pause, diplomats said.

"A humanitarian pause means no fighting. It means no bombing. It means no shooting. It means no fighting. It means exactly that," said the spokesman.

Dujarric added that "confidence-building steps" such as the release of prisoners and a monitoring of the Huthi rebel withdrawal would be needed to strengthen the truce.

More than 21.1 million people -- over 80 percent of Yemen's population -- are in need of aid, with 13 million facing food shortages.

Access to water has become difficult for 9.4 million people, according to the U.N.

More than 3,200 people have been killed and 1.26 million displaced in Yemen since the air campaign began in March, according to the U.N.

On Thursday, fighters allied with Hadi killed 15 rebels in an attack on their checkpoints in the country's southern Abyan province, a military source said.

In the second city of Aden, 17 rebels were killed also on Thursday in air strikes by coalition warplanes, according to pro-Hadi military sources.

The fighting followed a car bomb attack outside a mosque in Sanaa on Tuesday claimed by the Islamic State group, three weeks after a similar attack on a mosque also claimed by the extremist group.