The ruling came just hours before nearly all of the aid agency's employees were to be sent on administrative leave.