Sept. 3 (UPI) -- A federal judge cited First Amendment rights Wednesday in an order blocking the Trump administration's attempt to withhold more than $2 billion in government funding from Harvard University.

U.S. Judge Allison Burroughs of the District of Massachusetts restored the funding -- in the form of grants and contracts -- in response to a lawsuit brought by the university and employee groups. The lawsuit accused the President Donald Trump of leveraging the funding "to gain control of academic decision-making at Harvard."

Among the programs affected by the block in funding were research in science and medicine, including on radiation exposure, ALS diagnostics and tuberculosis treatment.

Trump attempted to withhold funding and block Harvard from admitting international students after taking issue with students' anti-Israel protests over the war in Gaza. The administration accused Harvard of failing to crack down on anti-Semitism.

Burroughs said that while Harvard was wrong to not attempt to curtail "hateful behavior for as long as it did," she doubts the administration's stated aims.