Judge James E. Boasberg had threatened to open contempt proceedings to determine whether the Trump administration had violated his order not to deport Venezuelan migrants to El Salvador.
The ruling cast doubt on claims by a coalition of Christian and Jewish groups that their congregations were at heightened risk of becoming targets for raids under the Trump administration.
The order declared that unauthorized Venezuelan immigrants who are at least 14 years old and part of the Tren de Aragua gang can be "apprehended, restrained, secured and removed."