HOUSTON (AP) — The attorney taking on President Donald Trump over his alleged affair with an adult film actress has appeared in Houston immigration court to try to secure the release of a 9-year-old boy from Guatemala.

Attorney Michael Avenatti (David McNew/Getty Images)

READ MORE: Nonprofit To Offer Texas Offensive Linemen $50,000 Annually

A judge on Tuesday denied Michael Avenatti’s request to dismiss the case against the boy.

Avenatti and another attorney, Ricardo de Anda, had offered to take the child from court to the airport and fly him to Guatemala, where his mother was deported in June.

READ MORE: Texas Man Gene Garcia Solis Charged With Threatening To Kill Ex-Wife

Instead, the judge ordered the boy to be removed once his case is formally processed by the government, which could take several weeks.

In addition to his legal fights on behalf of actress Stormy Daniels, Avenatti has taken up the cases of immigrant families separated under the Trump administration’s zero-tolerance policy.

MORE NEWS: 3 Charged In Deadly 5-Vehicle DWI Crash In Dallas

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)