The UN Secretary-General, among many, considered the war illegal