Transylvania’s winding, misty roads, castles and medieval fortresses set the stage for some of Europe’s darkest legends, the most famous of which is Count Dracula.

Despite having never set foot in Transylvania himself, 19th-Century author Bram Stoker based his vampire lore on the strigoi (from the Latin ‘striga’ meaning ‘witch’ or ‘evil spirit’) thanks to a book he found in England's Whitby Library called An Account of the Principalities of Wallachia and Moldavia. In the book, Vlad Tepes, a historical ruler who fought against invading Turks, caught his attention. He was son of Vlad Dracul of the House of Drăculești and was the perfect character on whom to rest his blood-sucking main character.

Although Stoker’s Dracula was fictional, dark spirits have long existed in Eastern European folklore, as has the use of garlic to ward them off.

You may also be interested in:

• A medieval remedy for divorce

• The deadly dish people love to eat

• The bread that feeds the dead

Through practices passed down through generations, garlic is thought to protect people and homes from evil spirits, as well as curing sickness such as colds and coughs. The strigoi are believed to suck the milk from mothers and cows (the inspiration for Stoker’s blood-sucking vampires), which is why Romanian peasants have long protected their livestock by smearing their horns with garlic.

But beyond folklore, garlic is a must on every Romanian’s plate.

Garlic is a must on every Romanian’s plate

One evening I was feasting with friends at Conacul Brătescu, a Romanian restaurant located a 10-minute walk from Bran Castle (the inspiration for Stoker’s Dracula’s Castle). A group of tourists on the next table were watching with inquisitive eyes as we smothered our trout and polenta in mujdei, a pungent Romanian sauce made from crushed garlic cloves that are salted and vigorously mixed with water and sunflower oil, or yoghurt in some cases. While many people eschew garlic in their food for fear of smelling of it, Romanians have a cult-like appreciation for the plant. The principle is simple: the more, the better.

“It just doesn’t taste the same without,” my friend Alexandru Pavelescu exclaimed.

Two more generous portions of mujdei were brought in and finished in a matter of minutes, both as a sauce for the fish or simply spread on bread.

Deemed irreplaceable in flavouring steaks and other foods, garlic has always been a widespread crop in Romania. In Copălău village in Botosani County, the aromatic plant is cultivated by more than 40% of the locals. Considered unique due to the remote settlement’s soil quality, the garlic of Copălău has gained fame both nationally and internationally – so much so that the county’s agricultural authorities are preparing to register it as a product with a protected geographical indication.

Garlic has long been thought of as a magical plant

At a home level, garlic is used in ciorbă, the word for the country’s many soups containing vegetables and meat, such as ciorbă de burtă (tripe soup) or its lighter version, ciorbă rădăuţeană made with chicken. Present on every menu, the popular skinless ground beef and pork sausages known as mici owe their juicy, savoury taste to the generous amount of garlic in the recipe.

Aside from being an essential ingredient in Romanian cuisine, garlic has long been thought of as a magical plant. On the eve of Saint Andrew (the patron saint of Romania) on 29 November, garlic is believed to keep you safe against strigoi and moroi, evil spirits of those passed on that haunt the household of relatives still living. A Romanian Halloween of sorts, residents of rural areas both eat garlic and smear it on the corners of windows and doors to protect themselves. Rows of garlic can be seen hanging with the same purpose.

“Due to its curing properties as an alternative remedy, garlic has been given further symbolic attributes as a ritualistic plant, bearing an apotropaic role of protection,” said Ana Iuga, ethnologist at the Romanian Peasant Museum.

All the important transitions in life are accompanied by a set of rituals – garlic is the leitmotif behind them

But it doesn’t stop here. In Romania, garlic is considered a more powerful (natural) medicine than most antibiotics, due to a compound called allicin (released when the garlic is chopped or crushed) that has similar properties as penicillin, and dishes such as garlic soup made with roasted garlic heads blended with carrots, onions, potatoes, parsnip and celery are served to combat the flu. Grandmothers and great-grandmothers pass down the tradition of smearing freshly halved garlic cloves on toast for both taste and health purposes.

“Tradition and folklore are deeply engrained into Romanian culture in a syncretism dating even before Christianity,” said Gabriela Solomon, co-founder of My Secret Romania, during a garlic-themed culinary workshop. “All the important transitions in life – birth, marriage and death – are accompanied by a set of rituals that are preserved even by highly educated people. Garlic is the leitmotif behind them.”

In keeping with this national belief that garlic has miraculous powers, the Garlic Festival, currently in its fifth year, takes place each September in the Tihuţa Pass in the Bârgău mountains (Eastern Carpathians). This is where Transylvania meets Bukovina, long considered the gateway to the realm of Count Dracula as depicted in Bram Stoker’s novel under its former Hungarian name ‘Borgo Pass’. At the festival, traditional dishes with garlic are prepared, garlic wreaths are woven, and magic shows and spells are all part of the event.

So, whether or not vampires really exist in Romania, garlic most definitely does, in its food, medicine and ancient folklore.

Culinary Roots is a series from BBC Travel connecting to the rare and local foods woven into a place’s heritage.

Join over three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.