By Greg Barrow
BBC's United Nations correspondent
A compromise was reached over the resolution
The United Nations Security Council has voted unanimously in favour of a resolution
to increase the protection of aid workers in conflict zones.
The resolution, put forward by the Mexican Government, also recognises that attacks on humanitarian workers should constitute a war crime.
However, the vote was delayed after the United States insisted on the removal of language referring to the international criminal court, which Washington does not recognise.
The vote comes one week after the devastating attack on the UN headquarters in Baghdad, in which 23 people died.
Despite the groundswell of support for the resolution, it was almost blocked by the United States, which objected to language that noted attacks on aid workers constitute a war crime under the statutes of the International Criminal Court, or ICC.
Struggle to unify
Washington does not recognise the court, and diplomats say US officials insisted on removing any part of the text which could lead to the possible prosecution of American citizens in front of the ICC.
After initially refusing to back down, Mexico agreed to drop the reference to the International Criminal Court.
Diplomats then had to labour over acceptable terminology that would define attacks on aid workers as a war crime.
Human rights groups and aid agencies say the compromise solution has taken some of the conviction and clarity away from a resolution that sought for the first time to recognise the gravity of attacks on humanitarian workers.
Some too have been disappointed that the Security Council once again struggled to unify around a subject that appeared so pressing and urgent in the aftermath of last week's attack on the UN.