The diet and foraging behaviour of 15 radio-tagged pangolins were studied in the Sabi Sand Wildtuin for 14 months, together with the community composition and occurrence of epigaeic ants and termites. Fifty-five ant and termite species of 25 genera were trapped in pitfalls of which Pheidole sp. 2 was the most common (27% occurrence). Five termite and 15 ant species were preyed on by pangolins. Six of these species constituted 97% of the diet while ants formed 96% of the diet. Anoplolepis custodiens constituted the major component of the pangolins' diet (77% occurrence) while forming only 5% of the trapped ants. Above-ground ant and termite activity was higher during summer than during winter (an 11-fold difference for A. custodiens), and the above-ground activity was also higher during the day than at night. Pangolins fed for 16% of their foraging time. However, 99% of the observed feeding bouts (mean duration 40 s) were on subterranean prey. The mean dig depth was 3.8 cm. Prey from deeper digs were fed upon for longer periods. A model taking into account various ant characteristics suggests that ant abundance and ant size are the two most important factors determining the number of feeding bouts that pangolins undertake on a particular ant species. Temperature effects on ant activity and their nest characteristics may exclude pangolins from parts of southern Africa.