The University of California, led by president Janet Napolitano, filed a federal lawsuit against the Trump administration Friday alleging its recent decision to wind down the Deferred Action for Childhood Arrivals program violates the rights of the school and its students because it is "nothing more than [an] unreasoned executive whim."

The university filed the suit in the Northern District of California against the Department of Homeland Security and acting Secretary Elaine Duke.

"As a result of the Defendants' actions, the Dreamers face expulsion from the only country that they call home, based on nothing more than unreasoned executive whim," the complaint stated. "The University faces the loss of vital members of its community, students and employees. It is hard to imagine a decision less reasoned, more damaging, or undertaken with less care. ... Defendants' capricious rescission of the DACA program violates both the procedural and substantive requirements of the APA (Administrative Procedure Act), as well as the Due Process Clause of the Fifth Amendment."

Napolitano has a personal connection to DACA because she served as Homeland Security secretary from 2009 to 2013 and oversaw the department's rollout of the program. Former President Barack Obama created DACA through a 2012 executive action.

"Neither I, nor the University of California, take the step of suing the federal government lightly, especially not the very agency that I led," Napolitano said in a statement. "It is imperative, however, that we stand up for these vital members of the UC community. They represent the best of who we are — hard working, resilient and motivated high achievers. To arbitrarily and capriciously end the DACA program, which benefits our country as a whole, is not only unlawful, it is contrary to our national values and bad policy." The lawsuit asks the court to set aside the Trump administration's rescission of DACA because it is "unconstitutional, unjust, and unlawful."

The DACA lawsuit is the first filed by a university.

The University of California said it educates an estimated 4,000 illegal immigrants, including DACA recipients.

Covington & Burlington LLP is working pro bono on the case with UC officials.

DHS announced Tuesday that per instruction from the Justice Department, its U.S. Citizenship and Immigration Services agency would begin winding down DACA.

"This administration's decision to terminate DACA was not taken lightly. The Department of Justice has carefully evaluated the program's constitutionality and determined it conflicts with our existing immigration laws," said Duke.

"As a result of recent litigation, we were faced with two options: Wind the program down in an orderly fashion that protects beneficiaries in the near-term while working with Congress to pass legislation; or allow the judiciary to potentially shut the program down completely and immediately. We chose the least disruptive option."

Under the program, people under the age of 18 who were brought to the U.S. illegally can apply for deportation protection and work permits for two years at a time.

Under the closing procedures, DACA's beneficiaries will not be affected for six months until March 5. No new requests will be considered and only renewals of the two-year permits will be reviewed after Oct. 5.

The Trump administration has said that method of phasing out DACA will give Congress time to write legislation dealing with current DACA recipients, if it so chooses.

A group of 10 state attorneys general threatened in June to sue the Trump administration if it did not rescind DACA by Sept. 5. On Sept. 1, Tennessee backed out of the coalition. The nine remaining states — Alabama, Arkansas, Idaho, Kansas, Louisiana, Nebraska, South Carolina, Texas, and West Virginia — are being led by Texas Attorney General Ken Paxton.

On the other side of the issue, attorneys general in 15 states and the District of Columbia filed a lawsuit Wednesday that aims to protect DACA recipients.