Something important happened at the Kennedy Center on Saturday night, and it was an opera called “Appomattox.”

Another opera of that name, by Philip Glass and Christopher Hampton, had its world premiere in San Francisco in 2007. The opera that the Washington National Opera opened on Saturday is also called “Appomattox” and is also by Glass and Hampton, but it’s a complete revision of the first opera, with an entirely new second act. And although I didn’t see the opera in San Francisco, I can say that if you didn’t see this Act II, which manages to bring Martin Luther King Jr. and LBJ and their contemporaries to musical life without being stilted or preachy or eye-rolling, and which sears across the stage like a firework of light and color and rage and pain and beauty, then you haven’t yet really seen “Appomattox.”

Forget what you think you know about Philip Glass — or remember it and wonder, because the score is unmistakably Glass without having many of the traits detractors tend to associate with the composer. You can certainly hear those so-called minimalist patterns going on in the orchestra, taxing the players’ fingers with their repetitions, but in the service of raw operatic emotion, beneath incisive and dramatic vocal writing. And you can certainly say there’s something film-like about this opera by a composer who’s written a number of film scores, but film-like in the sense of being so engrossing that you are pulled in without fully remembering where you are — something that happens a lot more often in film than in contemporary opera.

Glass is one of the most prolific and most-performed opera composers working today — he’s written 27 of them. “Appomattox” shows that he’s attained mastery in the genre — and it is, of those I’ve seen, by far the most moving.

What happened, I think, is that the revisions got to the heart of what Hampton and Glass actually wanted to say. The original “Appomattox,” largely preserved in Act I, is about the Civil War, and is plenty colorful itself as it outlines the events leading up to the honorably worked-out truce that ended the war and, with it, slavery. It starts with an opening vignette of a chorus of black soldiers singing “Tenting tonight on the old camp ground,” spread across the proscenium like a widescreen film in Tazewell Thompson’s production, followed by an ensemble of intertwining women’s voices as Mrs. Lincoln and Mrs. Grant, Mrs. Lee and Mrs. Lincoln’s dressmaker sing “war is sorrowful,” which though lovely is the nearest the opera gets to cliche.

The meat of the act, though, is the exchanges between Lincoln (Tom Fox) and Frederick Douglass (Soloman Howard) at Lincoln’s second inaugural, when Douglass demands the vote for black citizens, and between Robert E. Lee (David Pittsinger) and Ulysses S. Grant (Richard Paul Fink), standing before large Confederate and Union flags as they correspond with each other before the signing of the truce, leaving Pittsinger’s statuesque Lee, resonant of voice and nuanced of acting, honorable in defeat.

But some of the poignancy of Act I stems from the fact that the good hopes and intentions of that truce were dashed, and in the opera’s first version that wasn’t fully spelled out. Hampton went back and reworked the libretto into a play that incorporated the civil rights era; Glass was eager to revise the opera as well. And with the new material, the creators step out from behind the historical screen and reveal themselves.

If you ever questioned the ability of Glass’s music to be emotional, the searing, swelling music in Act II around Johnson’s astonishingly powerful nationally broadcast message to Congress (“It is not just Negroes, but really it is all of us, who must overcome the crippling legacy of bigotry and injustice. And we shall overcome.”) should convince you. Not to mention the 2011 epilogue in which Edgar Ray Killen (Pittsinger, magisterial again), jailed for the 1964 killings of three civil rights workers, graphically describes their deaths as the music loses its patterns and explodes into angry wordless jabberings of rage. (Dante Santiago Anzolini, the conductor, deserves extra praise for pulling off a solid performance after learning this score on a few days’ notice when Dennis Russell Davies, who was scheduled to conduct, injured himself in a fall and was forced to cancel just before the start of rehearsals.)

And, in Act II, it’s no longer enough for Glass simply to incorporate the music of the past: With his own original version of “Glory, Glory Hallelujah” at the end of one of Martin Luther King Jr.’s speeches, he rewrites it, movingly.

What’s astonishing is how naturally and fluidly all this material allows itself to be depicted operatically. It perhaps comes as no surprise that King is a natural operatic figure, and Soloman Howard — young, charismatic and vocally imposing with a rumble-the-floorboards bass — does him justice. But LBJ is profane, quirky and given to using the toilet during official meetings (yes, it’s in the opera), and that both the work and Fox, singing his second president of the night, remain true to the historical record and the historical flavor of Johnson is something of a tour de force. And simply hearing the rage and pain of black civil rights activists front and center on stage, starting with the chorus that opens the act, might alone be enough to establish this as a significant opera, even if the choral writing weren’t so effective.

Thompson, the director, does a fine job keeping the narrative clear and moving on a relatively simple two-story set and helping to develop an unusually rich collection of characters. Standouts among the really wonderful cast, apart from those already mentioned, included Melody Moore, who sang Mrs. Grant and Vi Liuzzo, a civil rights volunteer, with a clear shining voice; Chrystal E. Williams as dressmaker Elizabeth Keckley and Coretta Scott King; Aleksey Bogdanov with a pitch-perfect oiliness as George Wallace; Anne-Carolyn Bird as the two first ladies, and Frederick Ballentine. Ballentine sang some of the most painful arias in the opera: a description of the murder of Jimmie Lee Jackson, a civil rights activist, in Act II, and an account of the Colfax massacre of 1873, in which dozens of black men were slaughtered in cold blood.

Hampton’s libretto is an artful adaptation of his play, adding some choral and ensemble scenes that wouldn’t work in spoken theater and that also underline the parallels between the two acts. A pendant to the Colfax massacre epilogue to Act I is the epilogue to Act II, in which Pittsinger’s unrepentant Killen voices the hatred and threat that persist today. But as that sinister episode died away, the women returned to the stage, one by one, in an ensemble pleading for an end to sorrow and a rejection of racism and prejudice. It is as deeply moving as anything I’ve seen in opera. This opera runs for only a week; I will certainly be going again, and I think everybody should see it.

Appomattox runs through Nov. 22 at the Kennedy Center Opera House.