In the early 19th century, the tin mines in Cornwall, the county on England’s rugged south-western tip, fell into decline. Many miners crossed the Atlantic in search of work. They had an especially warm welcome in Mexico, whose war of independence from Spain (1810-21) had left its infrastructure battered and its mines flooded. Trekking 250 miles through swamps, thicket and rainforests, hundreds of Cornish miners settled around the silver mines of Real del Monte, a mountainous town in the state of Hidalgo in central Mexico. They brought the tools and expertise needed to dig for treasure, as well as a treasure of their own: a half-moon-shaped pocket pie with a meat and vegetable filling.

The Cornish pasty, or paste as it came to be known in Mexico, was adopted as a local delicacy. Real del Monte’s cobbled streets are lined with red-tiled bakeries that emanate the aroma of freshly baked pasties. There is even a Museo del Paste, which features a steel oven and rusty mining tools, and where visitors can practise the “pull, tuck and pinch” technique that gives the pasty its distinctive crust. It was the only one in the world until St Austell in Cornwall followed suit last year. Real del Monte also hosts an annual pasty festival. The main event is the baking and eating of a 12-foot-long colossus. Once they’ve digested it, festival-goers dance the tango, mambo and rumba into the early hours. This year’s festival, in October, will screen “Ora sí ¡tenemos que ganar!” (“This time, we have to win!”), a Mexican film about miners, presumably fuelled by pasties, who mutiny against their mine’s heartless American owner.

The pasty was popular with miners because it made a supremely practical packed lunch. The golden pastry was tough as a miner’s hands and prevented the precious filling from spilling out. The “crimp”, the folded edge that resembles a thick braid of hair, was designed so it could be held by dirty hands then thrown away after the main part of the pasty had been eaten. The pasty’s practicality explains why it’s still widely eaten today. A staple in petrol and railway stations across Britain, sales of pasties account for 20% of the total turnover of Cornwall’s food and drink industry. Its Mexican cousin has it harder, competing with street-food stars like tacos and empanadas.

It’s the filling that sets the Mexican paste apart from the Cornish pasty. A traditional Cornish filling is made from beef skirt, onion, turnip and diced potatoes. Mexican favourites include pineapple, tinga (shredded meat marinated with tomatoes and chipotle chillies) and mole (a green or red chilli and chocolate sauce). Do bear in mind that if you opt for more adventurous fillings, you don’t get to call your pasty Cornish. In 2011 the Cornish pasty was awarded “protected geographical indication” status by the European Commission, offering it the same legal protection as Parma ham and champagne.