The Supreme Court of Appeal has declared a controversial contract to build a new multibillion-rand diplomatic headquarters for SA's diplomats in New York unlawful some seven years after it was reached.