The Chinese government denounced the agreement as illegal.