Was the Iraq war legal?

Willem Buiter's post gives me an opportunity to get something off my chest about the Iraq war. The question is: was it legal to go to war?

It's clear to me that to go to war you need permission from the UN in the form of a resolution of the Security Council. The UK tried to secure such a resolution, but was unable to. France in particular was against it. Since the UK failed to obtain UN authorization, it was illegal for the UK to then go to war. The people responsible for the crime are all the MPs that voted in the Commons for war.