Michael Avenatti agreed Wednesday to relinquish financial control of his longtime law firm hours after a former partner filed papers accusing him of hiding millions of dollars from the court that oversaw its bankruptcy.

The celebrity lawyer and his firm, Eagan Avenatti, consented to the appointment of a receiver to take possession of its bank accounts, case files, computers and other assets.