The opening lines of Viceroy’s House, British director Gurinder Chadha’s epic new film, are barked out in Hindi by a tough colonial Scot at the head of a vast team of flunkies who, only 70 years ago, were ensuring the smooth running of the 340-room palace in New Delhi that was headquarters for British rule of an entire subcontinent. The scene then shifts to two Indian staff overheard irreverently discussing an alabaster bust of Queen Victoria, the empress who “never even set foot in India”.

It is a world familiar from popular films and television dramas set during the Raj. But something is different. The traces are being kicked over after 200 years of subservience. The British are about to relinquish their hold on the “jewel in the crown” of empire.

When Chadha, best known for her 2002 film Bend It Like Beckham, set out to tell her story of “the people’s partition” of India, she wanted to focus on the lives of those affected, rather than linger on the terrible violence that marked the creation of India and Pakistan in 1947.

“‘The people’s partition’ was actually my working title seven years ago when I began,” she told the Observer. “I wanted to show the emotional impact, not the fighting. My maternal grandmother came to live with us in the 1970s and she was still totally traumatised. When she sat with us to watch telly she would be disturbed by conflict of any kind. We laughed at her, but she would say, ‘You don’t know what happened to us!’”

What the director could not guess was that her personal film, which premieres at the Berlin film festival in February, would also challenge accepted history. Studying the archives, Chadha came across confidential government documents that support a revisionist view of the lead-up to Indian independence, which was finally declared at the stroke of midnight on 15 August 1947. The British decision to draw a line through the whole of south Asia, creating two religiously defined new nations, was not entirely forced on them by the warring communities. It was, in fact, an idea hatched by Churchill during the war to protect British strategic interests.

Gurinder Chadha: ‘I was absolutely furious when Downton Abbey came out first, but now I am so grateful. The genre has become global in a very big way.’ Photograph: Sophia Evans/The Observer

“My big headline message is still that partition was a blunder. But the more I read, I found that secret British moves to retain influence over the port of Karachi gave me a new plot twist,” said Chadha. “History is always written by the victors, as we say at the outset of the film, and I was told at school that partition was ‘our’ fault because the Muslims, Sikhs and Hindus had fought with each other. But a document in the British Library marked ‘Top secret: only for circulation among chiefs of staff’ makes it clear the British felt they could not just hand all India back just after the war. The solution was for a Pakistani regime, friendly to Britain, to control Karachi, on the borders of Afghanistan, and not India.”

Chadha’s film stars Hugh Bonneville as the last viceroy, Louis Mountbatten, and Gillian Anderson as his influential wife, Edwina. When Viceroy’s House comes to British cinemas in March, it will be the first film to be released in two languages: English and Hindi.

“Bend It Like Beckham was the first film to be number one at the box office in both Britain and India, and this is just as proud a moment for me,” said Chadha. Her screenplay, co-written with her husband, Paul Mayeda Berges, and Moira Buffini, was inspired by her own family story. Chadha’s grandparents had been forced from their house in what is now Pakistan to travel as refugees to a new, Hindu-dominated India.

All the same, Chadha wanted to take a balanced view. “I have had to jump into so many camps to make this film. I wanted to be able to sit and watch it in London, in Delhi and in Lahore,” she said. A fair portrayal of Muhammad Ali Jinnah, leader of the Muslim League and the first governor general of Pakistan, was particularly important. “I told Denzil Smith, who plays Jinnah, that I wanted him to smile in this film. He is usually made such a villain.”

Early in Chadha’s research she met Prince Charles at a charity event and told him she planned a film about Mountbatten’s handling of Indian independence and partition. Intrigued, the prince suggested some further reading. The prince will probably be pleased that Mountbatten, a favourite great-uncle, is largely let off the hook by Chadha. Charming, respectful and diplomatic, Bonneville’s earl has no clue he is being used as a benign front for divisive British plans.

“One has to understand that throughout India Mountbatten is vilified,” said Chadha. “But when Narendra Singh Sarila, who wrote The Shadow of the Great Game, was working on another book with an assistant in the British Library in 1997, he found documents that prove that early plans for the shape of a future Pakistan were kept hidden,” said Chadha.

“I can see it was the right thing for the British government to do, from their perspective. They wanted a base to help control Russia. That was ‘the great game’ then and it continues.”

Mountbatten’s wife emerges from the film as a strong and modernising force. “The story is partly about a marriage. Edwina was very political and pushy, I think, although Mountbatten had been chosen to go out to India precisely because he wasn’t a politician,” said Chadha.

Lord and Lady Mountbatten and Mahatma Gandhi in New Delhi in March 1947, shortly before partition. Photograph: AP

An affair between Indian leader Jawaharlal Nehru and Lady Mountbatten is alluded to in a couple of shots, but Chadha judged it was not central to her tale. “It is widely known there was an immense closeness there, but, from what I gathered, the relationship was consummated after this period.”

Anderson’s Edwina battles prejudice inside Viceroy’s House and later helps refugees. These scenes were based on archive footage and on conversations with Lady Pamela Hicks, the couple’s daughter, now 87. “Pamela told us her mother sent back a Miss Hudson to the home counties when it was ‘discovered she was racially prejudiced’, so we put it in the film,” said Chadha.

While some historians blame Mountbatten and the British for religious violence that saw hundreds of thousands killed, others criticise Gandhi for aligning his politics with spiritualism and, later, with Hinduism. Chadha acknowledges this fault, but traces the fatal divisions back to a former viceroy, Lord Curzon.

A key wedding scene in the film shows Indians of all religions happily recognising each other’s faiths. “For centuries they had got on with the common principle that if you had a faith, it was OK. It was a binding thing,” she said. “There was conflict within that, of course. In 1857 the unrest known in Britain as the Indian Mutiny broke out. The Brits panicked and so Lord Curzon introduced the colonial concept of ‘divide and rule’.”

In 2006 Chadha was the subject of the BBC’s long-running history show, Who Do You Think You Are?, and found the experience “an emotional rollercoaster”. Visiting her grandfather’s home for the first time, she found Pakistani people living there who, like her family, had been forced to leave their former homes.

In 1941 the population of Karachi had been almost half Hindu, while a third of the inhabitants of Delhi were Muslim. A decade later there were almost no Hindus in Karachi and 200,000 Muslims had left Delhi.

The refugee journeys scarred even surviving families. Chadha’s other grandmother lost her grip on sanity for ever when her baby, Chadha’s aunt Tripat, died from starvation.

“Someone came and placed a rock on the baby’s chest. They wrapped her in a cloth and she was taken to the river. You can’t talk to my aunts about it even now. My story is just one of many,” said Chadha.

The Viceroy’s House is the centre of this tale of division. Chadha had planned an “Upstairs, Downstairs” approach, looking at life in the state rooms and in the servants’ quarters and was annoyed when Downton Abbey reached television screens first. “I was absolutely furious,” she said, “but now I am so grateful. The genre has become global in a very big way.” The hit ITV drama series also gave her a viceroy in Bonneville.

The Viceroy’s House, designed by British architect Edwin Lutyens, is now the state home of the Indian president. A visit from Chadha confirmed its “great presence. Impressive architecture was considered a necessary part of colonial rule. It was only completed in the early 1930s and I don’t think Lutyens would have expected it to be turned over to Indian hands just 20 years later.”

Chadha hoped to make a film like the British Raj films she loves: A Passage to India and Gandhi. “But it is my personal view. What makes this film British, with a Punjabi beating heart, is its sense of fairness. People will have quibbles, but Pakistanis seem to feel it shows they survived and Indians see all the British skulduggery.

“In Britain we can feel some guilt, but also now see what the politicians were trying to secure.”

ROAD TO DIVISION

1857 The Indian Mutiny, a rebellion against the British East India Company, known in India as the first war of independence.

1905 Lord Curzon, the British viceroy, formulates the “divide and rule” policy and partitions Bengal on 16 October into two new provinces: Bengal, and Eastern Bengal and Assam.

1945 PM Winston Churchill, leaving office, bequeaths the government a secret wartime plan to retain influence of the key strategic port of Karachi after Indian independence.

1946 First of a series of religious massacres in Calcutta.

March 1947 A new viceroy, Lord Louis Mountbatten, arrives with his wife, Edwina, and daughter, Pamela. Rioting and killing continues. Negotiations with Nehru, Jinnah and Gandhi fail.

15 August Independence is declared at midnight and two days later partition creates the Dominion of Pakistan (which included the future Bangladesh). The largest mass migration in human history follows, displacing 14 million Hindus, Sikhs and Muslims.