The UN Human Rights Council has agreed to send war crimes investigators to Yemen to examine alleged human rights violations, in a last-minute compromise between some Western states and Arab countries, including Saudi Arabia.

The council on Friday mandated Zeid Ra'ad Al Hussein, the UN rights chief, to send a group of "eminent experts" to Yemen, where a Saudi-led coalition has been bombing Houthi rebels since March 2015.

The compromise was reached after Saudi Arabia and other Arab states presented an amended draft resolution that was adopted by consensus without a vote, including by Yemen's delegation.

The investigation will give the strongest international component yet to an examination of abuses by all warring parties in a country that the UN says faces the world's greatest humanitarian disaster.

READ MORE: Yemen cholera outbreak could hit one million by 2018

Launching the probe marks a victory for a group of European countries and Canada which pushed hard for an international inquiry fully independent of the Yemeni national investigation, which the Saudis support.

The Saudi-led coalition has been accused of bombing schools, markets, hospitals and other civilian targets in support of Yemeni President Abd-Rabbu Mansour Hadi.

Houthi rebels, who control much of northern Yemen, including the capital, Sanaa, have also been accused of major violations, which the UN team will also probe.

Al Jazeera's Rosiland Jordan, reporting from the UN headquarters in New York, said the group of experts will head to Yemen "as soon as possible and will be expected to gather their evidence and present it to the Human Rights Council a year from now".

READ MORE: Saudi coalition kills hundreds of Yemenis in 2017: UN

Saudi Arabia had for the past two years succeeded in blocking the rights chief's call for an international investigation.

In a letter leaked to several media outlets this week, the kingdom threatened economic and diplomatic retaliation against council members who would vote in favour of the EU/Canadian proposal.

The Saudi envoy to the council, Abdulaziz Alwasil, ended up endorsing Friday's resolution, which was slightly softer than previous EU proposals.

An earlier Dutch/Canadian draft had asked for a Commission of Inquiry (COI) in Yemen, the UN's highest level investigation, but that call was removed from the adopted version.

Countries with significant and lucrative ties to Saudi Arabia, including the US, Britain and France, were reported to be seeking a compromise between the EU and Arab camps, which were deadlocked through the week on a resolution.

The war in Yemen has killed more than 10,000 people, according to the UN.

More than 17 million Yemenis are now facing dire food shortages, and a nationwide cholera epidemic has killed more than 2,100 people since April.