All but 3 foreigners have been freed from quarantine, state-run news agency reports