Image copyright Alamy

You may think of the samosa as a humble street snack but it is much, much more than that.

It is an historic artefact - as well as delectable evidence that there is nothing new about the process of globalisation.

Bite into a samosa and the notion that identity is defined by the boundaries of a nation state should shatter like the deep-fried crust.

These days it is considered a quintessentially Indian delicacy, but its history is far more complex and cosmopolitan than that.

Savour the sensation as your teeth sink into the soft, yielding centre. Let the flavours flow into your mouth.

What you are tasting is the story of India itself - the product of the fluid forces of the great migrations and interactions that shaped this country.

Image copyright Getty Images

The samosa's origins actually lie thousands of miles away in the ancient empires that rose up in the Iranian plateau at the dawn of civilization itself.

We don't know for certain when the first cooks shaped pastry into the now-familiar triangular shape but we do know that the origins of the name are Persian - "sanbosag".

The samosa is first mentioned in literature by the Persian historian Abul-Fazl Beyhaqi, writing in the 11th Century.

He describes a dainty delicacy, served as a snack in the great courts of the mighty Ghaznavid empire. The fine pastry was filled with minced meats, nuts and dried fruit and then fried till the pastry was crisp.

But the samosa was to be transformed as it followed the epic journey made by successive waves of migrants into India.

It was brought to India along the route the Aryans had taken more than 2,000 years earlier - through Central Asia and then over the great mountains in what is now Afghanistan, before descending down into the fertile plains of the great rivers of India.

Image copyright Kirtish Bhatt

This is the third article in a BBC series India on a plate, on the diversity and vibrancy of Indian food. Other stories in the series:

Why India is a nation of foodies

Cooking the world's oldest-known curry

The great armies of the Mamluks, Tamerlane and the Mughals later made the same journey, helping build the great sub-continental empire we now know as India.

And, just as India was reshaped by these waves of migrants, the samosa also underwent a transformation.

Initially it metamorphosed into something much less refined.

By the time it reached what is now Tajikistan and Uzbekistan it had become what Professor Pushpesh Pant, one of the world's experts on Indian food, describes as "a crude peasant dish".

Media playback is unsupported on your device Media caption Justin Rowlatt tries his hand at making samosas

The courtly titbit was now a high-calorie staple, a much bigger and heartier dish - the sort of thing a shepherd would take out into the pastures with him.

It retained its distinctive shape and was still fried, but the exotic nuts and fruits were gone - the savoury pastry was now filled with coarsely chopped goat or lamb eked out with onions and flavoured simply with salt.

Over the following centuries the samosa made its way over the icy passes of the Hindu Kush and into the Indian subcontinent.

What happened along the way explains why Professor Pant regards the samosa as the ultimate "syncretic dish" - the ultimate fusion of cultures.

Image copyright Getty Images Image caption The calorie-conscious may prefer their samosas baked

"I think the samosa tells you how influences, culinary and otherwise, have come across to us," he says, "and how India has adopted them, adapted them to its own requirements and milieu, and transformed them totally."

Once in India the samosa was taken up and tailored to local tastes, becoming the world's first fast food.

The samosa is endlessly adaptable and India introduced its own spices - adding coriander, pepper, caraway seeds, ginger and more.

The filling changed, too, with vegetables often replacing meat.

Later still it was to become the vehicle for other much more novel foodstuffs, because the modern Indian samosa is the product of yet another great historical upheaval - the discovery of the New World.

These days most samosas are filled with potato and flavoured with green chillies, ingredients only introduced from the New World by Portuguese traders in the 16th Century.

And the samosa has continued to evolve since then.

Everywhere you go in India it is different.

Image copyright Getty Images

Samosas vary from region to region, and even from shop to shop as samosa-makers compete for custom.

Sometimes they are monsters, an entire meal in a single crisp pastry casing.

Elsewhere they have re-emerged as a courtly treat - samosas are served as cocktail canapés at weddings and modish Delhi parties.

Even the wafer-thin pastry packed with mince and peas that the Moroccan traveller Ibn Batuta describes being served at the lavish banquets of the court of Mohammad bin Tughlaq in 14th Century Delhi, lives on in the "lukhmi" of Hyderabad.

Meanwhile in Punjab no samosa is complete without the addition of paneer - fresh Indian cheese - though elsewhere in India this is considered an aberration.

Not all samosas are savoury these days - at least one Delhi restaurant serves a delicious chocolate samosa.

And even the cooking techniques can vary.

The classic samosa is still fried to a crisp, golden finish, but you can sometimes find baked samosas for the calorie-conscious.

Some chefs have experimented with steamed samosas - a mistake, says Professor Pant. He argues that without the oil the flavours simply don't emerge properly.

And, of course, the samosa's journey did not end in India. After centuries of refinement and reworking here it followed new routes back out into the world.

Image copyright Getty Images Image caption These stuffed samosas come from Jodhpur in Rajasthan, north-west India

The British loved the samosa and spread the now uniquely Indian innovation across their vast empire - along with shampoo, bungalows, verandas and pyjamas.

And, as the Indian diaspora has spread around the globe in the last few centuries, they too took samosas with them.

Which is why what began as a tasty titbit for ancient Persian emperors is now enjoyed in virtually every country on Earth.

So as you savour this delicious snack remember this, wherever your samosa was prepared and however it was filled it embodies the essence of India - adaptable, inventive, tolerant and heterogeneous.

And many of the country's other delicious street foods have similarly fascinating stories.

As the BBC's South Asia correspondent I have the privilege to travel across India and as I go I intend to explore the incredible culinary history of this great nation through its street food.

So if there are any street foods that particularly tickle your palate - or you think will tickle mine - do please contact me and tell me what they are and where the best examples can be found and I'll do my best to get out there and taste them.

Message me via Twitter @BBCJustinR