Image copyright Getty Images Image caption Angiosperms produce flowers and fruits, which contain their seeds.

Scientists think they have the answer to a puzzle that baffled even Charles Darwin: How flowers evolved and spread to become the dominant plants on Earth.

Flowering plants, or angiosperms, make up about 90% of all living plant species, including most food crops.

In the distant past, they outpaced plants such as conifers and ferns, which predate them, but how they did this has has been a mystery.

New research suggests it is down to genome size - and small is better.

"It really comes down to a question of cell size and how you can build a small cell and still retain all the attributes that are necessary for life," says Kevin Simonin from San Francisco State University in California, US.

'Abominable mystery'

Hundreds of millions of years ago, the Earth was dominated by ferns and conifers. Then, about 150 million years ago, the first flowering plants appeared on the scene.

They quickly spread to all parts of the world, changing the landscape from muted green to a riot of vibrant colour.

Image copyright Getty Images Image caption Angiosperms are the most diverse group of land plants, with hundreds of thousands of known species

The reasons behind the incredible success and diversity of flowering plants have been debated for centuries.

Charles Darwin himself called it an "abominable mystery", fearing this apparent sudden leap might challenge his theory of evolution.

Simonin and co-researcher Adam Roddy, of Yale University, wondered if the size of the plant's genetic material - or genome - might be important.

The biologists analysed data held by the Royal Botanic Gardens, Kew, on the genome size of hundreds of plants, including flowering plants, gymnosperms (a group of plants, which include conifers and Ginkgo) and ferns.

'Strong evidence'

They then compared genome size with anatomical features such as the abundance of pores on leaves.

This provides "strong evidence", they say, that the success and rapid spread of flowering plants around the world is down to "genome downsizing".

By shrinking the size of the genome, which is contained within the nucleus of the cell, plants can build smaller cells.

In turn, this allows greater carbon dioxide uptake and carbon gain from photosynthesis, the process by which plants use light energy to turn carbon dioxide and water into glucose and oxygen.

Angiosperms can pack more veins and pores into their leaves, maximising their productivity.

The researchers say genome-downsizing happened only in the angiosperms, and this was ''a necessary prerequisite for rapid growth rates among land plants''.

"The flowering plants are the most important group of plants on Earth and now we finally know why they have been so successful," they say.

The research published in the journal PLOS Biology raises more questions about plants.

For instance, why were flowering plants able to shrink their genomes more than others? And why do ferns and conifers still exist, despite their large genomes and cells?

Follow Helen on Twitter.