LEGALLY

legally,adv. In a lawful way; in a manner that accords with the law.

[Blacks Law 8th]