Image copyright Thinkstock Image caption Maize was first domesticated by indigenous peoples in Mexico between 10,000 and 6,000 years ago

Scientific analysis of a cob of corn dating back 5,000 years shows how maize became one of our most popular cereals.

Farming by early civilisations started a process of domestication that produced the sweet yellow corn we use today for food or fuel.

Ancient DNA extracted from the cob gives a window into the past to the time when maize was first grown.

The cob is one of the oldest in the world and was excavated from a cave in the Tehuacan Valley, Mexico.

"Based on archaeological evidence and modern DNA evidence, we already know that maize was domesticated in Mexico some time between about 10,000 and 6,000 years ago," said Nathan Wales, of the Natural History Museum of Denmark in Copenhagen.

"What we did not know using modern DNA or other information is really how this process gets going and the timing of different events in the past."

Long history

The story of maize starts about 9,000 years ago, when people started collecting and consuming a wild grass called teosinte.

The plant eventually became modern maize, commonly known as corn or sweetcorn.

Image copyright Bruce Smith Image caption This cob of corn is 5,310 years old. It was discovered in the 1960s.

Maize as we know it looks very different from its wild ancestor.

The ancient cob is less than a 10th of the size of modern corn cobs, at about 2cm (0.8inch) long.

And the ancient cob produced only eight rows of kernels, about half that of modern maize.

The DNA of the specimen, known as Tehuacan162, is unusually well preserved.

Sequencing of the genome of the 5,310-year-old corn cob shows that it was genetically more similar to modern maize than to its wild ancestor.

The ancient maize already carried genetic changes that make kernels soft and palatable.

And it had lost the hard cases around the kernels seen in wild grasses.

Image copyright N Wales Image caption Ancient DNA gives a window into the past

About 5,000 years ago, indigenous people in Mexico were both hunter-gatherers and farmers.

They probably got most of their calories from wild plants and hunting, but at certain points in the year used food such as maize to supplement their diets.

"Today we eat sweetcorn, we use maize for fuel, but thousands of years ago people were utilising it differently," said Dr Wales, the lead researcher of the study.

"Rather than being totally focused on maize agriculture, people are using it as a secondary resource at certain times of the year."

Co-researcher Jazmin Ramos Madrigal said the findings, reported in Current Biology, are only the beginning of the story.

"Humans dispersed maize across the Americas very quickly and very successfully," she said.

"We want to know how humans dispersed it, which routes they took and how maize adapted to such diverse environments."

Follow Helen on Twitter.