The phrase "declaring illegal" means to officially rule against something, making it unlawful or unauthorized. The opposite of this expression could be "approving" or "legalizing." When something is authorized or legalized, it becomes acceptable and lawful for individuals or groups to undertake it, contrary to when it is declared or regarded as illegal. Another antonym for this term could be "validating," which entails the process of confirming or sanctioning something, making it legal or legitimate. Therefore, when something is declared illegal, it has been prohibited or disallowed, and its antonyms are approving, legalizing, or validating.