Shortly after Barack Obama’s 2008 election, the Washington Postpublished a story about Eugene Allen, a black butler who worked in the White House from the Truman to the Reagan Administrations, played golf with Ford, and saw a great deal of history unfold along the way. It caught the attention of writer Danny Strong and director Lee Daniels, and the film Lee Daniels’ The Butler — so named due to Hollywood’s byzantine copyright rules — is the result.

The opening credits begin with the usual “based on true events, etc.” business. But as Slate documented, the above paragraph accounts for pretty much everything that escapes fictionalization. Which isn’t surprising; the film is too tidy a thesis statement to be rigorously historical. But as a thesis statement on the black American experience in the second half of the 20th Century, it’s actually pretty good.

The Butler is basically a well executed Lifetime TV movie, interspersed with brief but real flashes of artistry. Outside of Tyler Perry’s work, it’s also one of the few major mainstream movies that would pass a black person’s version of the Bechdel Test with flying colors. At the very least, The Butler should serve well as a corrective lesson for anyone who views the mass emotional catharsis that greeted Obama’s election as suspicious or politically tawdry.

The titular character, here called Cecil Gaines (Forest Whitaker), grows up in a sharecropping family on a plantation. At a young age, he witnesses his mother’s rape at the hands of the farm’s white owner and then his father’s murder for protesting. The plantation matriarch (Vanessa Redgrave) takes pity on him and brings him into the house to be trained as a servant. This experience sets up Cecil’s philosophy of race relations for the rest of the film: keep your head down, stay in the good graces of powerful white folk, and hope for the best. A bit later in the film, Cecil’s son Louis (David Oyelowo) will fling himself headlong into the Civil Rights movement, and that father-son tension becomes The Butler’s central dynamic.

After striking out on his own as a young man, Cecil makes his way through a series of servant jobs, until finally landing the position of butler at the White House. There he meets two coworkers and lifelong friends: the foul-mouthed Carter (Cuba Gooding Jr.) and the thoughtful James (Lenny Kravitz). True to its genre roots, The Butler transforms the rotating presidential administrations into one of them most brazen series of stunt-casting I have ever seen. There’s Liev Schreiber, funny and effective as Lyndon B. Johnson; then the weirdly cast but subtly poignant work of John Cusack as Richard Nixon; the even weirder decision to have Alan Rickman – yes, that Alan Rickman – play Ronald Reagan; the straight-up WTF call to cast Robin Williams as Dwight D. Eisenhower; and then finally a remarkably affecting turn my James Marsden, of all people, as John F. Kennedy.

Other surrenders to genre convention are less salutary: the voice-over narration by Cecil in his old age is overdone and really never useful. Depressingly, the filmmakers also use it to spell out Cecil’s climactic revelation, when what we’re seeing on screen is quite sufficient to convey it. The Butler can feel like an episodic ravel card from American history, and Lee Daniels’ visual choices as director are serviceable but utterly uninspired.

The editing, by Joe Klotz, is another matter. A scene where Martin Luther King Jr. (Nelsan Ellis) explains to Louis the political import of his father’s work is saved from speechification by slick cross-cutting. And in the film’s best and most moving sequence, Louis learns how to do a sit-in protest at a meeting with the nonviolence tactician James Lawson (Jesse Williams, who you might recognize from Cabin in the Woods). That’s intercut with the actual diner sit-in, which turns ugly and violent once the white counter-protestors arrive. The editing expertly communicates the panic of the scene, the critical training and role-playing done at the meeting, and the power of Lawson’s nonviolence as a principled choice and a deliberate strategy rather than as some cave-in to sentiment.

That, it turn, is all intercut with a third sequence showing Cecil prepping the presidential dinner table. The effect is quiet but brutal: the uncomfortable symmetries between young Cecil’s role as the plantation’s “house nigger,” and his later duties as White House Butler, are not lost on the filmmakers. LBJ’s half-performed, half-genuine moral awakening on race is observed with both cutting humor and humanity, while the way The Butler deals with Reagan’s moral obtuseness is especially lacerating.

Oprah Winfrey’s performance as Cecil’s wife, Gloria, cannot go unmentioned. It’s arguably the The Butler’s best. She’s a force in her own right: in love with Cecil, occasionally furious at him for his long hours, tempted by infidelity with Howard (Terrence Howard), struggling with alcohol, and alternatively defending her husband and her son as it’s called for.

On that score, Louis may be an almost too-perfect encapsulation of Black Americans’ upheavals – he rockets from the Freedom Riders to the Black Panthers to Congress – but his relationship with Cecil movingly captures a critical inflection point in that history. It’s the moment when the understandable inclination to treat white racism as a force of nature gave way to the understanding that it’s a moral choice made by one’s fellow human beings, and they must be held accountable for it.

Louis comes to that political awareness rapidly, through a series of experiments in radicalism. Cecil comes to it slowly, through the slow and painstaking work of long years in the shadows. But ultimately, they both come to the same place.