China’s sweeping national security law is forcing technology firms to reconsider their presence in Hong Kong, and the nimblest among them — the city’s startups — are already moving data and people out or are devising plans to do so.

Beijing’s polarizing law, which took effect this month, upended Hong Kong’s tech scene just as it seemed on a path to becoming a regional hub.

Entrepreneurs now face a wave of concern from overseas clients and suppliers about the implications of running data and internet services under the law’s new regime of vastly expanded online policing powers. Many are making contingency plans and restructuring their operations away from Hong Kong.