Image caption Ahmar Mehmood now runs the family business selling sweets in Mardan

The Indian city of Badaun and the city of Mardan in Pakistan are separated by 1,200km of territory, a vicious communal divide and a heavily militarised border.

But Mardan's chief sweet delicacy - the Badauni pedha - still holds the aroma and the taste of a shared past.

And this has been made possible by a migrant family of semi-literate farmers who say they went into the pedha business because they "didn't know anything better to do".

Pedhas are grainy balls of condensed milk, or khoa, mixed with sugar and spices. They are believed to have originated in Varanasi and Mathura and have been used as religious offerings, or prasad, in Hindu temples.

While the delicacy spread to various parts of India early on, its advent in northwestern Pakistan dates to 1950 when a couple of villagers from India's Bareilly district set up a shop in Mardan.

The ambience of the shop is not dissimilar to most traditional sweet outlets across India and Pakistan; it is small and untidy, housed on the ground floor of a narrow, ramshackle three-storey building. The factory is located on the first floor.

But trading is brisk for a small city like Mardan; a salesman says they sell an average of 200kg of pedhas a day, besides other sweets.

How to make a Badauni pedha:

Asked to set out his special recipe, Mehmood Ali Khan just smiled. But here's one way to make it:

Condense milk with a special mixture of spices over a slow flame into a thick lump, called khoa

Shape the mixture into a ball and dip in sugar

Spice ingredients could include green cardamom, almonds and pistachios

A hand-painted signboard hangs from the second storey, covering the entire front of the building. Besides the name of the shop - Badauni Pedha House - it carries a portrait of Mehmood Ali Khan, the owner, who is introduced as "Baba-e-Zaiqa", or the "father of flavour".

But Mr Khan, 78 and now retired, says he is not the original founder of the business. He was just eight years old when India was divided.

"When partition happened, two of my seven brothers - the eldest and the one at number four - decided to migrate to Pakistan," he says.

"They said they would assess the situation and make arrangements for the rest of the family to relocate. But they faced problems - they couldn't find anything they could do for a living. So my elder brother, Ibn-e-Ali Khan, decided to introduce Badauni pedhas in Mardan."

Image caption Mehmood Ali Khan, seen here with his grandson, ran the pedha shop for years

Image caption Mehmood Ali Khan came to Pakistan in 1959, when he was 20

Back then, local consumers were strangers to the taste of a north Indian pedha. Also, Ibn-e-Ali's pedha was still some years from mimicking the addictive, mildly sweet milky tinge of the Badauni variety.

After a year their mother, a widow, started to fret. "She said that the family ought to stay together; that either my two brothers came back to Sirauli (the family's native village in Bareilly district), or everyone went to Pakistan."

Under the rules of partition his brothers, having migrated, could not return to India as Indian nationals, and they still did not have Pakistani passports to travel as visitors. So the family decided that two more brothers, third-eldest Mehfuz Ali Khan and fifth-eldest Mohammad Ali Khan, should join them in Pakistan to expedite a final plan.

Partition of India in August 1947

Perhaps the biggest movement of people in history, outside war and famine.

Two newly-independent states were created - India and Pakistan.

About 12 million people became refugees. Between half a million and a million people were killed in religious violence.

Tens of thousands of women were abducted.

This article is part of a BBC series looking at Partition 70 years on.

Read more:

But the family was not destined to reunite under one roof until the mid-1960s.

In the meantime, the four brothers who had moved to Pakistan filed claims for land compensation in lieu of what they said they had left behind in India. The claims were filed under a refugee resettlement plan devised by both India and Pakistan - believed to be one of the largest in modern history.

And some time in the early 1950s, the pedha business started to pick up.

"The only expertise Ibn-e-Ali had brought to pedha making was a farmer's knowledge of how to make khoa," says Mr Khan.

"We had grown up having buffaloes in our cattle pen and had watched the womenfolk condense leftover milk over a low flame. What he didn't know was the exact recipe, the spices."

This knowledge came in the early 1950s when, having received their Pakistani passports, Mehfuz Ali Khan and Mohammad Ali Khan went back to Sirauli. There they practiced sweet-making at some local outlets, and then went to train at Badaun's signature pedha shop, set up by the famous Mamman Khan.

"They arranged an apprenticeship at Mamman's shop through our relatives in Bareilly. The shop owner was loath to train potential competitors, but agreed to share the secret recipe after Mehfuz Ali Khan gave him his word that he would do business in Pakistan, not India. They trained at Mamman's shop for a couple of months before returning to Mardan."

Image caption Family members served an apprenticeship at Mamman Khan's shop in Badaun

As the land claims of the brothers started to mature, it was time for the mother and two youngest brothers - the youngest of all, Mohammad Wali Khan, and Mr Khan, the second-youngest - to migrate to Mardan.

"That was 1959. I was just 20 then. Our second-eldest brother, Mehboob Ali Khan, stayed back in Sirauli to sell off our holdings and clear debts. He migrated in 1964."

By this time, most of the brothers had moved to the land allotted to them in Dera Ismail Khan area, leaving the pedha business to young Mehmood Ali Khan.

Mr Khan's son, Ahmar Mehmood, who now runs the business, says that for most members of the family the pedha business was just a means to survive until they went back to farming.

"They considered it a lowly profession (given a general feudal mindset), but lived with it perhaps because they thought it was easy," he says.

"But my father made a conscious decision to stick to this business. He came to Pakistan after the deadline for property claims had lapsed, and the business was doing well by then."

Image caption The shop in Mardan has stood for decades, serving a little taste of India

Image caption Lots of pedha shops have sprung up in Mardan, often run by Mr Khan's former staff

But why would a landowning family abandon its place of birth and move to a country of strangers, especially when there were no serious communal riots in their region, and the family did not owe any ideological commitment to the ranks of All India Muslim League which had campaigned for a separate Muslim state in India?

Mr Khan is not very clear. "I don't know what went into their heads. They screwed us too," he gives out a hearty laugh.

One reason may be that he was very young at the time and did not know what was going on. Also, the family had suffered reverses in its fortunes and may not have remained as affluent as it once was.

"My grandfather had six sons. He was a big landowner in Saidpur (a village in Badaun district). My father died when my grandfather was still alive, which meant that (in accordance with Islamic inheritance law) we were left without a right to our father's share in our grandfather's property. So we moved with our mother to Sirauli (which was her ancestral village)."

This would explain the restlessness of the brothers to move out, and the anxiety of the mother to keep the family together even if it meant migrating to a strange land.

But nostalgia for the past survives in the family. Ahmar, who was born in Mardan, calls himself Ahmar Badayuni on his Facebook page.

He has been to India a number of times to meet his relatives, mostly with his mother, who died recently.

"When I'm in Bareilly, I'm always bewildered when I imagine how the family got split right through the middle. The love we get there feels like a different kind of love. Sometimes I do ask my father why they decided to leave that place. It would have been good if we stayed."

But the family hasn't done badly in Pakistan either. Most of them acquired land and went back to farming. One brother went to college and retired as a professor. And Mr Khan owns a cosy house in the affluent Sham Ganj area of Mardan.

And while they may have suffered trials and tribulations, they did manage to bring with them one of the most enduring legacies of the region they left behind - the grainy balls of condensed milk and spices mixed to a secret recipe of Badaun's Mamman Khan.