A sharply divided Supreme Court on Wednesday ruled that the Trump administration must comply with a district court order and pay out nearly $2 billion in foreign assistance funds to nonprofit aid groups for work already completed on the government’s behalf.

The court ruled 5-4 with Chief Justice John Roberts and Justice Amy Coney Barrett siding with the liberal justices.