Objective: To design a simple model to assess the effectiveness of measures to prevent the spread of coronavirus disease 2019 (COVID-19) to different regions of mainland China. Methods: We extracted data on population movements from an internet company data set and the numbers of confirmed cases of COVID-19 from government sources. On 23 January 2020 all travel in and out of the city of Wuhan was prohibited to control the spread of the disease. We modelled two key factors affecting the cumulative number of COVID-19 cases in regions outside Wuhan by 1 March 2020: (i) the total the number of people leaving Wuhan during 20-26 January 2020; and (ii) the number of seed cases from Wuhan before 19 January 2020, represented by the cumulative number of confirmed cases on 29 January 2020. We constructed a regression model to predict the cumulative number of cases in non-Wuhan regions in three assumed epidemic control scenarios. Findings: Delaying the start date of control measures by only 3 days would have increased the estimated 30 699 confirmed cases of COVID-19 by 1 March 2020 in regions outside Wuhan by 34.6% (to 41 330 people). Advancing controls by 3 days would reduce infections by 30.8% (to 21 235 people) with basic control measures or 48.6% (to 15 796 people) with strict control measures. Based on standard residual values from the model, we were able to rank regions which were most effective in controlling the epidemic. Conclusion: The control measures in Wuhan combined with nationwide traffic restrictions and self-isolation reduced the ongoing spread of COVID-19 across China.