A federal judge on Thursday stopped the deportations of an asylum-seeking woman and her young daughter who were already aboard a plane to El Salvador, criticizing the Trump administration for trying to remove them while they were challenging their cases in court.

In Washington, U.S. District Judge Emmet G. Sullivan, who was appointed by President Bill Clinton in 1994, threatened to hold Attorney General Jeff Sessions in contempt of court if U.S. officials didn’t immediately return the pair to the U.S.

“It’s...