“The course of true love never did run smooth.” Shakespeare’s 16th century words from “A Midsummer Night’s Dream” accurately describe the real life 20th century marriage of African Crown Prince Seretse Khama of Bechuanaland (now Botswana) and London clerk Ruth Williams. Their love story forms the basis of Amma Asante’s “A United Kingdom.”

One evening in 1947, Ruth (Rosamund Pike) reluctantly joins her sister Muriel (Laura Carmichael of “Downton Abbey”) at a missionary social, never guessing how that night will impact the rest of her life. All the men at the dance are law students from Africa. When Ruth overhears Seretse (David Oyelowo) discussing politics, she is intrigued and sparks fly between the two.

Early in their dating life, Seretse tells Ruth of his royal heritage and responsibilities in Africa. These facts do not deter their love. Neither does the opposition to their interracial relationship, which comes at them from all sides: working-class white men considered Williams “ours” due to her skin color; both families strongly object; and, most dangerously, conservative political forces in the British government plot against them.

Post-World War II, the world was rapidly changing. India had won its independence from British rule. England was proposing to divide Palestine between the Jews and the Arabs, a plan neither group accepted (and still does not). And American General George Marshall had just put forth the Marshall plan to help rebuild war-torn Europe.

Against this backdrop, the marriage of a black man and a white woman should not have been front-page news. But, because Seretse was in line to rule Bechuanaland, their courtship and marriage became a political issue. Many whites in Britain opposed the relationship because they viewed anyone with a different skin color as inferior. Due to the negative impacts of European colonialism, Africans did not trust anyone with a white skin, including Ruth.

The top priority for British government officials was keeping control in Bechuanaland. South Africa, Bechuanaland’s neighbor, had long wanted to annex the country. South Africa would officially establish nationwide segregation (aka apartheid) in 1949. The British wanted to maintain good terms with South Africa but Seretse and Ruth’s marriage was offensive to the racist South African government. So, the British tried various tactics to drive the couple apart.

Director Amma Asante skillfully guides this tale of love, racism, oppression, and political machinations. She includes key establishing shots of London and Africa, but for the most part frames this drama around character interactions. The script by Guy Hibbert, based on Susan Williams’ book “Colour Bar,” brings historical events to light but never loses sight of the love between Seretse and Ruth.

As he did in “Selma” and “Queen of Katwe,” Oyelowo expertly portrays a real-life figure. His performance as Dr. Martin Luther King, Jr. in “Selma” was inspired. The words Oyelowo speaks on multiple occasions to Seretse’s tribe in “A United Kingdom” are just as heartfelt and moving.

Pike presents Ruth as gracious yet strong in her convictions. Ruth must show bravery multiple times throughout the film, yet doesn’t lose her dignity despite the obstacles placed between her and her husband.

Also noteworthy are the performances by Jack Davenport as British Commissioner Canning and Vusi Kunene as Seretse’s uncle, Tshekedi Khama. Both characters object to the marriage due to political goals and snobbish viewpoints. Canning and Tshekedi believe in the importance of monarchy (be it African or British). That leads them to question Ruth’s motives in marrying Seretse. Davenport appears quite the proper British official before coolly unveiling his character’s duplicity. As Seretse’s uncle, Kunene gives his character a steely resolve born from being of royal lineage. The set of Kunene’s jaw conveys determination whenever Tshekedi meets with his nephew.

Terry Pheto as Seretse’s sister Naledi goes through one of the most healing transformations in “A United Kingdom.” When she first greets Ruth, it is with disdain and anger. But, as the film progresses, Naledi bends, eventually calling Ruth “sister.” Pheto handles this evolution with believable emotion and grace.

The soundtrack to “A United Kingdom” utilizes a variety of styles to emphasize action. The film opens with Patrick Doyle’s rich symphonic score accompanying Tshekedi writing to his nephew from Africa while Seretse competes in a grueling boxing match at his British university. As Seretse and Ruth share their mutual love of music, jazz standards accompany their energized swing dancing. And, at a crucial moment in the drama, the women of Bechuanaland sing a song in their own language, praising Ruth and expressing their acceptance and love for this British woman who made their home her home.

“A United Kingdom” conveys via its real-life story both a tale of dedicated love and a look at historical events on the African continent. It is a testament to the strength of the real-life Seretse and Ruth that, by facing their opposition and following their hearts, they not only forged a strong marriage and family, they also effected positive change for the nation of Botswana and its people.

Much like the recent “Loving” (also based on a true life love story), “A United Kingdom” shows the ability of a couple to cause a shift in viewpoints. But, as both movies remind audiences, change takes time, determination, and faith in the power of love to outlast hate.