Opponents of the war have long claimed that the attack on Afghanistan was illegal under international law, constituted unjustified aggression and would lead to the deaths of many civilians through the bombing campaign and by preventing humanitarian aid workers from bringing food into the country.
The UN Charter is a treaty ratified by the United States and thus part of US law.