The American Civil Liberties Union is asking a judge to stop the government from preventing two undocumented teenagers, who are in federal custody, from seeking abortions, according to court papers filed on Friday.

In the documents, filed around 6 p.m. in the United States District Court for the District of Columbia in Washington, the A.C.L.U. asked for a temporary restraining order on behalf of the teenagers, both 17 and identified as Jane Roe and Jane Poe.

Brigitte Amiri, a senior staff attorney for the A.C.L.U., said in an interview on Friday night that the organization had learned of the teenagers’ situations this week and was able to make contact with them on Thursday and Friday.

Their circumstances echo that of another undocumented teenager whose case set off a monthlong legal fight by the A.C.L.U. with the Trump administration. She had an abortion one day after a court ruling in October forced federal officials to allow it.