Illegal immigrants snared by deportation officers have “the freedom to say goodbye” to their families, a federal judge in New York ruled Monday, ordering the government to release a prominent activist to his family.

Judge Katherine B. Forrest, an Obama appointee to the bench, said the government was following the law when it picked up Ravidath Lawrence Ragbir, the illegal immigrant. But she said there were “larger, more fundamental” rights at stake that were trampled on.

“In sum, the court finds that when this country allowed petitioner to become a part of our community fabric, allowed him to build a life with and among us and to enjoy the liberties and freedom that come with that, it committed itself to allowance of an orderly departure when the time came,” she wrote. “By denying petitioner these rights, the government has acted wrongly.”