The British did just that during the Boer wars, against an opponent that engaged in guerilla warfare on their home turfeand had access to modern weaponry. They gained control of the country by partitioning it with blockhouses, strongpoints and barbed wire fences, scorched earth tactics, involving indiscriminate destruction of farms, and forced resettlement of many Boers into concentration camps. Fortunately, many of these tactics have gotten out of fashion. Also, this required the deployment of hundreds of thousands of troops for many years, which could be justified economically only by the diamonds mined in not-yet-South Africa.