“A United Kingdom” is based on the story of Prince Seretse Khama of Bechuanaland (then a protectorate of the UK, now independent Botswana), who caused an international stir when he married a white woman from London in the late 1940s.

Although interracial marriage was legal in England, its government was wary of upsetting neighboring South Africa, where the vile policies of apartheid kept the races separate. The UK had interests in gold and other minerals in South Africa, so it tried to keep Khama from ascending to the throne. His other obstacle was his uncle Vusi, who had been running the country since Seretse’s father had died, holding that position until his nephew was of age. He was willing to give up the position, but not if Seretse brought a white queen home to his people.

As Seretse, David Oyelowo is compelling and magnetic, as he was in “Selma” (and “Queen of Katwe,” another small film I’ve recommended). Rosamund Pike (“Gone Girl”) is very good as Ruth Williams, the white English woman who falls in love with and marries Khama, willing to stand by his side as he takes on these impediments to his success. Tom Felton (Draco Malfoy) and Jack Davenport are positively slimy as two of the British bureaucrats who, with their upper-crust disdain for all things African, take joy in pushing Khama around.

This movie has been called a British version of “Loving,” but it’s much more than that. Like “Gandhi,” “A United Kingdom” exposes British imperialism for the damage it did around the world (in Africa, southern Asia, and the Middle East, too) by trying to control people it considered inferior without concern for the impact its decisions had on the locals. Like “Hidden Figures” and “Hacksaw Ridge,” this is one of those true stories you never knew about — mostly because we were never taught much about African history outside of Egypt.

In the hands of a lesser director, the narrative might have been told not through the experiences of the Khamas, but filtered through the eyes of a white reporter. There is such a character in “A United Kingdom,” but it’s a small role and he’s not the storyteller. Instead, director Amma Assante keeps our focus on the loving couple at the center of the piece as Seretse proves his worth as a leader and Ruth converts herself into a valuable member of the community.

One interesting note: David Oyelowo is one of the producers, and his wife Jessica, who is white, plays the wife of Davenport’s detestable British bureaucrat. One wonders if the couple’s own interracial marriage has ever faced issues even on the same scale as the Khamas’ did.

I give “A United Kingdom” an 8.5 out of 10.