BOSTON (AP) — A federal judge in Boston on Wednesday ordered the reversal of the Trump administration’s cuts to more than $2.6 billion in funding research grants for Harvard University.

U.S. District Judge Allison Burroughs sided with the Ivy League school, ruling the cuts amounted to illegal retaliation for Harvard’s rejection of White House demands for changes to its governance and policies.

The ruling delivers a significant victory to Harvard in its battle with the Trump administration, which also has sought to prevent the school from hosting foreign students and threatened to revoke its tax-exempt status.

The ruling reverses a series of funding freezes that later became outright cuts as the Trump administration escalated its fight with the nation’s wealthiest university. If it stands, it promises to revive Harvard’s sprawling research operation and hundreds of projects that lost federal money.

Beyond the courthouse, the Trump administration and Harvard officials have been discussing a potential agreement that would end investigations and allow the university to regain access to federal funding. President Donald Trump has said he wants Harvard to pay no less than $500 million, but no deal has materialized even as the administration has struck agreements with Columbia and Brown.