Millions of years ago, Africa's savannas were covered with thick, ancient forests, which disappeared and turned into the grassy ecosystems that they are today.

Almost a fifth of the world's land surface is covered by savannas. Yet, for years it has been a mystery how these grassy ecosystems came to replace the ancient forests.

One answer, it was thought, might be climate change, yet most savannas occur in climates that also support forests. The other possibility was fire. Savanna trees and shrubs are often adapted to frequent fires, while forest trees are not.

But a study that includes a group of South African scientists has found that the arrival of browsing medium sized antelopes was probably what turned Africa's ancient forests into the open savannas.

By comparing the timing of the evolution of thorns on about 2000 woody tree species in southern Africa and the time that antelopes arrived in Africa, a group of scientists, including Dr Gareth Hempson from the School of Animal Plants and Environmental Studies at the University of Witwatersrand, found that trees like African acacias evolved thorns as a defence mechanism at exactly the same time that antelope arrived in Africa.

"It all makes perfect sense," says Hempson. "Spines (thorns) really appear to be most effective against medium- and large-sized browsers like impala and kudu, and spiny trees are most common in the places where these animals are most abundant," says Hempson.

Hempson developed a herbivore biomass map of Africa while he was a post-doctoral fellow at Wits and the University of Cape Town.

"After presenting my herbivore biomass data at a conference, Dr Tristan Charles-Dominique [the lead author on the paper, from the University of Cape Town] said he had to show me something – we placed our laptops next to each other and compared his spiny tree abundance maps with my animal density maps – the match with medium and large browsing species was remarkable!"

The study that was published in the journal, Proceedings of the National Academy of Sciences (PNAS) on Monday (5 September 2016) analysed the distribution of nearly 2000 woody species from southern Africa and found that spiny plants are most common in arid savannas with high densities of mammal browsers. They are rare in humid savannas on infertile soils and absent in forests.

The study used DNA data for African trees collected by Professor Michelle van der Bank and her team at the University of Johannesburg, to reconstruct the history of spiny plant evolution. In collaboration with Prof Jonathan Davies, an expert in phylogenetic analysis from McGill University, the team was then able to date the evolutionary origins of spines.

"We were shocked," said Professor van der Bank "to discover that spiny plants only appeared about 15 million years ago, 40 million years after mammals replaced dinosaurs". For most of this time, Africa was an island continent dominated by now-extinct ancestors of browsing elephants and hyrax. "Apparently, spines just didn't work as a plant defense against these ancient mammal groups" commented Prof van der Bank.

But in a remarkable example of apparent coevolution, the diversification of spiny plants (thorn trees) coincides with the appearance of antelope.

Antelope were latecomers to Africa appearing only after the continent collided with Eurasia. They browsed in novel ways and were highly efficient herbivores. This injection of new types of browsers, argue the authors, demolished young forest trees, opening up forests to the grass invaders.

"We know something of the history of fire from fossil charcoal, but we do not have good fossil evidence for browser/plant interactions" said Professor William Bond, (SAEON and UCT) an author on the study, "Could we use the evolutionary history of spiny plants to examine whether mammal browsing opened up the ancient forests to savannas?"

The evidence is striking: "It was astonishing to see that there was this wide radiation of thorns across tree species just after the arrival of antelope on the continent," says Hempson.

The parallel radiation of spiny plants and the antelope that feed on them initiated the rise of savannas in the drier more fertile regions of Africa. Fire only began to roll back the forests to create wetter savannas several million years later.

One implication of the study is that the loss of Africa's native browsing antelope may threaten the future of drier savannas, and lead to their replacement by dense, woody scrub of little ecological or economic value.