question: During the early months of the current COVID-19 pandemic, social-distancing measures effectively slowed disease transmission in many countries in Europe and Asia, but the same benefits have not been observed in some developing countries such as Brazil. In part, this is due to a failure to organise systematic testing campaigns at nationwide or even regional levels. To gain effective control of the pandemic, decision-makers in developing countries, particularly those with large populations, must overcome difficulties posed by an unequal distribution of wealth combined with low daily testing capacities. The economic infrastructure of the country, often concentrated in a few cities, forces workers to travel from commuter cities and rural areas, which induces strong nonlinear effects on disease transmission. In the present study, we develop a smart testing strategy to identify geographic regions where COVID-19 testing could most effectively be deployed to limit further disease transmission. The strategy uses readily available anonymised mobility and demographic data integrated with intensive care unit (ICU) occupancy data and city-specific social-distancing measures. Taking into account the heterogeneity of ICU bed occupancy in differing regions and the stages of disease evolution, we use a data-driven study of the Brazilian state of Sao Paulo as an example to show that smart testing strategies can rapidly limit transmission while reducing the need for social-distancing measures, thus returning life to a so-called new normal, even when testing capacity is limited.