Gillian Anderson and Hugh Bonneville play Lady and Lord Mountbatten with Neeraj Kabi as Gandhi. The drama opens a window on a complex chapter of political history, albeit with a heavy hand. (Kerry Monteen/IFC Films)

“Viceroy’s House” is a bit like “Downton Abbey,” only set in Delhi, against the backdrop of India’s independence from English colonial rule. The most obvious similarity is that Hugh Bonneville (“Downton’s” Earl of Grantham) plays the aristocratic lead here: Lord Louis Mountbatten (1900-1979), the last viceroy of India. Mountbatten’s mission was to hand the country back to its people in 1947. But first, he had to deal with partitioning the nation to create Pakistan. Like “Downton Abbey,” the story is also told from the perspective of the people working within the grandiose manse of the title, a residence that, as one character notes, “makes Buckingham Palace look like a bungalow.”

This history has personal significance, as it turns out, for director Gurinder Chadha ("Bend It Like Beckham," "Bride & Prejudice"), who wrote the story with Moira Buffini and Paul Mayeda Berges. The most emotional part of the movie is the revelation — coming just before the end credits — that Chadha's Indian grandmother was a refu­gee whose baby girl starved to death after the partition.

Mountbatten’s less privileged counterpart is Jeet Kumar (Manish Dayal), a Hindu former police chief who has come to Delhi to work as one of the viceroy’s personal attendants. He immediately runs into Aalia (Huma Qureshi), a Muslim woman he has long loved. Just as they begin to rekindle their relationship, Aalia’s betrothed — an Indian soldier fighting abroad — reappears.

This subplot should be the heart and soul of the movie, but the love triangle isn’t nearly as engaging as the political maneuvering. To its credit, the movie accomplishes a difficult task — making sense of a complicated period in history. Strapped for cash after the war, the British were desperate to extricate themselves from their colonial obligations without letting their reputation suffer. At the same time, violence between Muslims and Hindus was exploding across India.

In the film, Mountbatten finds himself stuck between Muhammad Ali Jinnah (Denzil Smith), the head of the All-India Muslim League, who advocated for the creation of Pakistan as a separate Muslim state, and Jawaharlal Nehru (Tanveer Ghani), the first prime minister of India, who wanted to keep the nation intact. The occasional fake newsreel helps fill in gaps left by otherwise artful expository dialogue.

Mountbatten and his wife, Edwina (a wonderful Gillian Anderson), are portrayed as unusually progressive, even by today’s standards. While other British politicos throw out casually racist comments — in one scene, as workers stand at attention nearby — the Mountbattens are anachronistically open-minded. Edwina visits the cooks in the kitchen, although she’s told it’s un­or­tho­dox, and immediately fires a British employee who makes an insensitive comment. When the city is on the verge of riots, the couple leaves the safety of their palatial home to hand out food and water.

It’s all a bit much.

Chadha uses the same heavy hand in the melodrama between Jeet and Aalia, whose already complicated relationship is compounded by their different religions. Qureshi doesn’t get to do much acting, beyond looking perpetually pained.

In the end, “Viceroy’s House” works, but mainly as a historical refresher on the 70th anniversary of Indian independence. As drama, it’s a reminder that truth is sometimes more affecting than fiction.

Unrated. At Landmark’s Bethesda Row Cinema. Contains nothing objectionable. 106 minutes.