The construction of a mosque on land allocated for a park has been declared illegal by the Supreme Court.