In a partial victory for Iran, judges at the International Court of Justice (ICJ) on Thursday ruled Washington had illegally allowed courts to freeze assets of some Iranian companies and ordered the United States to pay compensation but left the amount to be determined later.