LOS ANGELES — Immigrant advocates sued the Trump administration Tuesday for ending a free hotline that allowed detained immigrants to report concerns about custody conditions after it was featured on the show Orange Is the New Black.

The nonprofit group Freedom for Immigrants, which has run the hotline since 2013 with a free phone line provided by U.S. Immigration and Customs Enforcement, sued in federal court in Los Angeles.

The lawsuit alleged that the administration yanked the hotline in August after it was featured on the Netflix show, which drew attention to the group’s criticism of detention conditions for immigrants.

“They cannot shut down this hotline in retaliation for the fact they don’t like what Freedom for Immigrants is saying,” said Moez Kaba, a partner at Hueston Hennigan, which is representing the group. “And they can’t shut down the hotline because they want to prevent Freedom for Immigrants from saying it.”

Immigration and Customs Enforcement did not immediately respond to an email message seeking comment about the lawsuit.

The agency gave the group the line after volunteers in Florida who visited detained immigrants requested it.

Immigrants in detention centers were then allowed to call for free, enabling the group — which also runs visitation programs at facilities across the country — to monitor custody conditions and help reconnect detainees with loved ones separated at the border, the lawsuit said.

It was also helpful for immigrants to remain in contact with hotline operators as the immigrants were transferred across multiple facilities, especially if they didn’t have family or friends nearby, the suit said.

The hotline received between 600 and 14,500 calls per month, according to the lawsuit.