The Security Council moved quickly after the United States reversed a long-standing policy and agreed not to veto the document.
The United States, which abstained with three other countries, got significant concessions, including guarantees it sought that Americans working in Sudan would not be handed over to either the ICC or any other nation's courts if they commit crimes in Sudan.
With Secretary-General Kofi Annan looking on on Thursday night, the council voted 11-0 with four abstentions, from Algeria, Brazil, China, and the United States. The vote came at 10.30pm (0330 GMT) after hours of delay.
"This resolution marks a turning point, for it is sending the message beyond Darfur to all of those criminals responsible for crimes against humanity and war crimes who all too often believed that they were beyond the pale of justice," France's UN Ambassador Jean-Marc de la Sabliere said.
Acting US Ambassador Anne Patterson said the United States still fundamentally objected to the court but was determined to get something done on Sudan.
"It is important that the international community speak with one voice in order to help promote effective accountability," Patterson said.
Even with the legal concessions, the US decision not to veto was a major shift. Ever since he took office, President George Bush had actively opposed the court, and American diplomats had repeatedly said they opposed any variation that referred the Sudan cases to it.
"This resolution marks a turning point, for it is sending the message beyond Darfur to all of those criminals responsible for crimes against humanity and war crimes who all too often believed that they were beyond the pale of justice"
Jean-Marc de la Sabliere, France's UN Ambassador
On Wednesday, Bush administration officials had already said they were dropping their objections to using the International Criminal Court for Sudanese suspects because of the legal guarantees it got for its citizens.
But the threat of a US veto loomed all day on Thursday as diplomats grappled with language acceptable to all sides.
France, Britain and seven other Security Council members have ratified the ICC statute, while two more have signed and are expected to ratify. In total, 98 countries are parties to the treaty and 139 are signatories.
Crimes against humanity
The resolution refers Darfur cases since 1 July 2002 to the court - a move in line with the recommendation of a UN panel that had concluded in January that crimes against humanity, but not genocide, occurred in the vast western region of Sudan.
The document is the last of three Security Council resolutions aimed at putting pressure on Sudan to stop a crisis in Darfur, where the number of dead from a conflict between government-backed fighters in Darfur is now estimated at 180,000.
One of the resolutions strengthens the arms embargo and imposes an asset freeze and travel ban on those who defy peace efforts.
The other will send 10,000 UN peacekeepers to monitor a peace deal between the government and southern rebels that ended a 21-year civil war. The council hopes the resolution will also help Darfur move towards peace.
A veto on the third resolution could have been politically damaging because it would have left the prosecution of war crimes suspects in limbo. And it was the United States itself that had declared genocide has occurred in Darfur.
The Bush administration had wanted an African court to try those accused of war crimes, but the US proposal had little support among the 14 other Security Council nations.
The US decision to allow the court to prosecute war crimes perpetrators could raise hackles among conservatives for whom the court is an unaccountable body that cannot be trusted.
War crime suspects will be tried
for atrocities committed in Sudan
They include John Bolton, the undersecretary of state for arms control and international security and President Bush's nominee to become the next US ambassador to the United Nations.
Weakening the court
The final negotiations hinged on the language in paragraph six of the resolution, which had nothing to do with Sudan itself. It says citizens of countries that have not ratified the treaty establishing the court may only be prosecuted by their own national courts.
Some countries object to that because their laws allow for the prosecution of foreign nationals suspected of committing a crime against their citizens.
Several diplomats said they objected because they feared paragraph six seriously weakened the criminal court.
"Operative paragraph six subsumes the independence of the ICC to the political and diplomatic vagaries of the Security Council," Philippines UN Ambassador Laoro Baja said. "Nevertheless, this eventually may well be worth the sacrifice if impunity is ended in Darfur."