Molecular studies strongly support a single origin of cultivated carrot in Central Asia. The wild ancestors of the carrot are likely to have originated from Persia (regions of which are now Iran and Afghanistan), which remain the centre of diversity of Daucus carota, the wild carrot. A naturally occurring subspecies of the wild carrot, Daucus carota subsp. sativus, has been selectively bred over the centuries to reduce bitterness, increase sweetness and minimise the woody core. This has produced the familiar garden vegetable.
When they were first cultivated, carrots were grown for their aromatic leaves and seeds rather than their roots. Carrot seeds have been found in Switzerland and Southern Germany dating to 2000–3000 BC. Some close relatives of the carrot are still grown for their leaves and seeds, for example parsley, fennel, dill and cumin. The first mention of the root in classical sources is during the 1st century, and the carrot may have been eaten as a root vegetable by the Romans, although there is some ambiguity about this, as they used the word pastinaca for both carrots and parsnips.
The plant appears to have been introduced into Europe via Spain by the Moors in the 8th century, and in the 10th century, in such locations in West Asia, India and Europe, the roots were purple. The modern carrot originated in Afghanistan at about this time. The Jewish scholar Simeon Seth describes both red and yellow carrots in the 11th century. The 12th-century Arab Andalusian agriculturist, Ibn al-'Awwam, also mentions roots of these colors; Cultivated carrots appeared in China in the 14th century, and in Japan in the 18th century. Orange-colored carrots appeared in the Netherlands in the 17th century, which has been related to the fact that the Dutch flag at the time, the Prince's Flag, included orange. These, the modern carrots, were intended by the antiquary John Aubrey (1626–1697) when he noted in his memorandum "Carrots were first sown at Beckington in Somersetshire. Some very old Man there did remember their first bringing hither." European settlers introduced the carrot to Colonial America in the 17th century.