Yemen's government told the United Nations on Wednesday that it agreed to a conditional truce to end more than three months of fighting and hopes it can be implemented in the coming days, spokesman Rajeh Badi said. "The Yemeni authorities have informed the Secretary General of the United Nations Ban Ki-moon of its agreement to implement a truce in the coming days," Badi told Reuters by phone from the government's seat of exile in Saudi Arabia. Yemen's President Abd-Rabbu Mansour Hadi, the spokesman said, had set "guarantees" for a pause, including the release of prisoners by Yemen's dominant Houthi group and their withdrawal from four provinces where they are fighting local militias. Saudi Arabia and an Arab coalition have been bombing the Iran-allied Houthi group and their allies in Yemen's army in order to restore Hadi and back armed opponents of the Houthis. Meanwhile, ground combat between various Yemeni armed factions and Saudi-led air strikes have deepened the plight of civilians in Yemen, with the United Nations saying more than 80 percent of its 25 million people need some form of emergency aid. Before Saudi Arabia intervened in March to try to restore Yemen's president to power and roll back the Iranian-allied Houthi militia now controlling large areas of the country, Yemen imported more than 90 percent of its food, mostly by sea. Since then, many shipping companies have pulled out. Those still willing to bring cargoes face incalculable delays and mandatory searches by coalition warships hunting for arms bound for the Houthis, the dominant warring faction. According to a humanitarian aid assessment compiled by the U.S. Navy and obtained by Reuters, just 42 ships reached Yemen with goods in June compared with 100 in March. Further data was not available. Before the crisis, the number of ships making calls to Yemen's major southern port of Aden alone averaged over 1,000 annually in recent years.