A century after the Civil War abolished slavery, laws enforcing racial segregation criminalized marriage, and sometimes also sex, between members of different races. Sixteen states had such bans until the 1967 Supreme Court decision on Loving vs. Virginia declared those laws unconstitutional.

Jeff Nichols turns that history into an intimate domestic drama in “Loving.” Based on the experiences of Richard and Mildred Loving, the real-life plaintiffs in that landmark case, it shows how far America has come in its views of race and equality — and how far is left to go.

In nuanced performances that will surely contend for acting honors at the Academy Awards, Joel Edgerton and Ruth Negga play the rural Virginia couple. He’s a bricklayer, drag racing fan and auto mechanic, the strong, silent macho man with a sensitive soul. She’s an unassuming housewife, polite and persistent in pursuit of fair treatment even at times when others would wilt. They are a touching team together, his mouth compressed with quiet anger, her eyes expressing inner sadness, both full of courage and love.

When their 1958 marriage certificate issued in Washington, D.C., is rejected in their home state, the local sheriff (a stunningly smug Marton Csokas) and Judge Leon Bazile (David Jensen, equally sanctimonious) arrest and sentence them to prison for violating Virginia’s Racial Integrity Act. They plead guilty, agree to leave the state for 25 years, and move on. They simply love each other and want to be married and left alone.

They move to Washington and focus on raising their three children. But their case becomes a matter of political agenda. Mildred sees a broadcast of Martin Luther King’s 1963 March on Washington for Jobs and Freedom. Her landlord tells her, “You need to write Bobby Kennedy and get you some civil rights.” When she does, the attorney general passes the letter along to the American Civil Liberties Union, where staff lawyer Bernard Cohen (his neurotic uncertainty and professional ambition impishly captured by comedian Nick Kroll) carries it back to court again and again.

Michael Shannon briefly steals the film in a walk-in as Life magazine photographer Grey Villet, whose visual essay of their home life cuts to the literal heart of the story, their love story. The couple had little desire for publicity, but their lawyers felt it could help their ongoing appeals, and Villet charmed his way to their dinner table and living room. Waiting patiently as they stretched out on the couch together, Villet snapped the warm, devoted couple smiling at a TV show in a rare moment of relaxed happiness. It became an iconic photo, documenting a relationship that clearly held no danger for the state of Virginia, which had declared their children illegitimate.

Nichols, who directed and wrote the script, dramatizes the story honestly, with minor artistic license. It’s a challenge to tell an important American story without cheap sentiment, but using clear thought to earn strong and hard-won emotions. In “Loving,” we have a glimpse back in time to an era when the personal, civic and moral responsibility of small groups helped remind the nation of its commitment to humanity, decency and justice. It is a film not to be missed.