Sirlen Costa, of Brazil, holds her son Samuel, 5, as her niece Danyelle Sales, right, looks on during a news conference, Monday, Aug. 26, 2019, in Boston. Costa brought her son to the United States seeking treatment for his short bowel syndrome. Doctors and immigrant advocates say federal immigration authorities are unfairly ordering foreign born children granted deferred action for medical treatment to return to their countries. (AP Photo/Elise Amendola)
CNN  — 

Civil rights groups filed a lawsuit Thursday to block the Trump administration from ending a deportation relief policy that allowed some undocumented families with serious medical conditions to remain in the United States while they received medical care.

The lawsuit argues that the “abrupt termination of a longstanding government program” was illegal and “unconscionable.”

US Citizenship and Immigration Services, which decided who could remain in the US under certain conditions, announced Monday that it will re-open some pending cases of those applying for relief after backlash to ending its policy.

The USCIS decision to end consideration for deportation relief comes amid a slew of controversial changes at the agency, as well as a number of Trump administration policy initiatives aimed at tightening legal immigration. Last week, another USCIS policy change aimed at citizenship gained national attention and sparked confusion among military and diplomatic groups, concerned that the rule change would place hurdles before children of federal employees and military workers serving abroad.

The lawsuit, brought by the ACLU of Massachusetts and Lawyers for Civil Rights, was filed on behalf of the Irish International Immigrant Center, which represents clients with severe illnesses.

“[T]he Trump Administration abruptly prohibited USCIS field offices from granting deferred action in cases of serious medical need, and has now put the lives of scores of medically fragile individuals at immense and immediate risk,” reads the lawsuit.

Irish International Immigrant Center represents individuals and families in 19 cases with serious medical need, including children seeking treatment for illnesses such as cancer, cerebral palsy, and muscular dystrophy, according to the lawsuit. These families come from countries in the Caribbean, Central and South America, and Africa.

For example, there is the family of a seven-year-old with a severe form of epilepsy, and a ten-year-old blinded by eye cancer, and her mother among those represented.

As a matter of practice, USCIS does not comment on pending litigation, a spokesperson told CNN Thursday.

Last week, a spokesperson for USCIS said the agency “has stopped granting non-military requests for deferred action in order to focus agency resources on administering the country’s lawful immigration system.”

USCIS also said Immigration and Customs Enforcement would now be responsible for deciding nonmilitary issues that “warrant deferred action.”

USCIS received around 1,000 nonmilitary deferred action requests per year, most of which were not approved, according to the agency. Most of these types of requests are related to family support or medical issues.

While individuals have the ability to ask ICE for a “stay of deportation,” that’s not the same as the previous USCIS procedure. Rather, it requires that someone go through immigration proceedings, receive an order of deportation, and then request reprieve from ICE.

ICE does not accept “applications” for deferred action, a discretionary act that allows the Department of Homeland Security to delay or prevent immigration enforcement, according to ICE last week.

In August, USCIS sent letters to family members who had requested relief from deportation, saying the agency’s field offices “no longer consider requests for deferred action,” except for certain military exceptions.

In the lawsuit, the advocate groups argue that the administration’s decision was “arbitrary, capricious” and violates the Administrative Procedures Act, as well as Equal Protection guarantees of the Constitution.

“By suddenly and secretly ending a program that protects sick sick children and their families, the administration is effectively sending many of these children to their deaths,” said Carol Rose, executive director of the ACLU of Massachusetts.

A spokesperson for USCIS defended the decision last week, saying the move was made because “it is not appropriate for the agency to adjudicate requests for suspended enforcement not clearly assigned to USCIS in law or policy.”