“It’s almost like a photojournalist approach to opera,” says composer Philip Glass, “where the material is changing while you’re writing it.”

The opera in question is about an event from 1865. At least, that’s how it started out. Its creators then thoroughly rewrote it, adding a whole new second act set in 1965 and a 2015 epilogue. Even so, Glass says, “I might have to revise it again.”

“Appomattox,” by Glass and playwright Christopher Hampton, is having its first performances at the Washington National Opera this week. An opera with the same title, by the same artists, opened at the San Francisco Opera in 2007. But what’s being staged here is so different — “I wrote again the same amount of music,” Glass said last week in an interview at the Kennedy Center — that the company is billing it as a world premiere.

The reason for all the volatility: The real subject of “Appomattox” is civil rights — the quest for racial equality in America. And, as current events keep reminding us, we have a ways to go.

“It’s such fascinating material, and so centrally important at the moment, that you keep thinking about it. It’s not like a piece of art that you finish and there it is,” says Hampton, the playwright and Oscar-winning screenwriter of “Dangerous Liaisons,” among many other works.

Soloman Howard portrays Martin Luther King, Jr. for a portrait during a rehearsal for the opera, "Appomattox" at the Kennedy Center on Tuesday November 10, 2015 in Washington, DC. (Matt McClain/The Washington Post)

“The argument of the piece,” Glass says, “is that the war never ended.”

‘Civil War to Civil Rights’

Many opera librettos have been adapted from plays. “Appomattox” is the only libretto I’m aware of that has been adapted into one. After the opera’s San Francisco premiere, Hampton says, he and Glass “felt it was slightly unfinished,” and he ended up using the material to write a new play, also called “Appomattox,” which was presented at the Guthrie Theater in Minneapolis in 2012 as part of a festival of his work.

A British citizen born in the Azores, Hampton knew nothing about the Civil War when Glass approached him about the San Francisco commission — “ideal,” Glass says, to have an outsider’s perspective — but he rapidly became something of an expert. Glass’s original interest in the material, Hampton says, was “the fact that Lee and Grant and Lincoln behaved so honorably [at Appomattox] and the truce was so carefully worked out and fair. He thought that this was an extraordinary contrast to what happens in this century.” But Hampton realized that things didn’t end there.

“I thought, ‘I don’t want to write something that gives the impression that they sign these pieces of paper and everything is okay,’ ” he says. “So I noodged it into the 20th century.” Even in the San Francisco version of the opera, there’s a flash-forward scene in which the Rev. Martin Luther King Jr. appears.

That wasn’t enough, though. Noticing that there was almost exactly a century between Lincoln’s second inaugural (at which, in the opera, Frederick Douglass asks Lincoln to grant black citizens the right to vote) and the start of the Selma marches in Alabama, also aimed at getting the vote, Hampton wrote a new second act set in 1965, in which King asks President Lyndon B. Johnson the same question.

“I went to see [the play],” Glass says, “and I said, ‘Christopher, this is great. I can’t wait to do a revision [of the opera].’ ”

Meanwhile, Francesca Zambello, who had just been appointed artistic adviser to the Washington National Opera (two years before assuming her current position as artistic director), approached Glass about the idea of doing “Appomattox” at the Washington National Opera, which had never staged an opera by Glass. “How could the world’s most-performed living composer not have something at the Washington National Opera?” Zambello asks. On discovering that the creators were eager to rewrite it, she had the company co-commission the new version.

Portraying Martin Luther King, Jr., Soloman Howard, right center, rehearses a scene with others for the opera, "Appomattox.” (Matt McClain/The Washington Post)

Thus, the new play was readapted into yet another opera libretto, which followed Hampton’s revisions closely — except, Glass says, “it’s not four hours long.”

“Now I truly question if we should have changed the title,” Zambello said earlier this month in a conversation at the Kennedy Center. “It’s like, ‘Civil War to Civil Rights.’ [The title] ‘Appomattox’ doesn’t say that. It talks about a seminal moment where everything, everybody thought, got fixed, but actually everything went wrong.

“Appomattox as a symbol is correct, but I want the audience [to] understand that it’s also very contemporary. The moment I tell people Martin Luther King is in this opera, they go, ‘Oh, really?’ ”

Both Hampton and Glass seized on the hunt for historical facts and nuggets with a kind of glee. One impetus for the Selma marches was the killing of activist Jimmie Lee Jackson by a trooper named James Bonard Fowler.

“As I was beginning to think about this and work on this in 2010, [Fowler] was [jailed],” Hampton. Fowler — who served only five months for the killing — now appears in the opera’s epilogue, set in 2015, in an invented dialogue with Edgar Ray Killen, who was convicted in 2005 in the 1964 killings of three civil rights activists.

Most of the opera’s dialogue is based on historical fact, but because the King estate doesn’t allow the replication of the texts of his speeches, Hampton had to base the operatic King words on his other writings. “It was kind of fun to write a Martin Luther King speech,” he says. (The parallels between the acts in the opera are reinforced by the fact that singers take double roles: Douglass and King are sung by Soloman Howard; Lincoln and LBJ, by Tom Fox; and Robert E. Lee and Killen, by David Pittsinger, who has to transform himself from gentleman to bigot in the process.)

Glass became equally enthusiastic about verisimilitude. This past August, he read that Amelia Boynton Robinson, one of the organizers of the first Selma march who was beaten by state troopers, had died at age 104. He immediately contacted Hampton and Tazewell Thompson, who is directing the piece for WNO, and said, according to Thompson, “We should do something for her. We should put her in the opera.” Robinson is now in the opera.

I’m not the only one who’s doing this,” Glass observes. “People working in the theater today, I think we’re finding some of the most engaging material is stuff in the newspaper. You wouldn’t have said that in the ’50s. Well, you might have said it, but no one would have listened.”

‘The great American story’

With “Appomattox,” Glass — who at 78 years old has written 27 operas — has been able to tackle both an iconic historic subject and contemporary events. Both have been career-long preoccupations.

“I think one of the fascinating things about him has been his exploration into history and to great leaders,” Zambello says of Glass’s operatic oeuvre. “Obviously Gandhi [in ‘Satyagraha’], Einstein, Galileo, Disney [‘The Perfect American’]. These huge symbols of world domination, basically.

“For him now to write about America — so often he’s explored other countries. But he’s really talking about our problems. And to grow up in the era of civil rights, and change, I know it’s very close to his heart.”

This isn’t Glass’s first approach to the Civil War: He and the avant-garde theater director Robert Wilson created “The CIVIL WarS: A tree is best measured when it is down” in the early 1980s. Lincoln also appears in “The Perfect American,” while King has a silent but significant part in Act III of “Satyagraha.”

“I didn’t think I was that interested in American history,” Glass says. “But I can’t seem to get away from it, either. Now this [opera], really, is a frontal attack with that material. But I would say that for sure this is the great American story.”

By “it,” Glass means less the Civil War than the history of race relations in this country. “This is our story,” he says. “It defines us, it’s made us who we are. And we’re still struggling with that.”

It’s striking that Glass, the composer, talks more about the opera’s content than about the musical changes involved in creating a new half for an existing work. “I was given such a beautiful libretto,” he says, “all I had to do was set it to music. I thought Christopher did the work for me. All I had to do was put in the tunes.” Musically, the two acts are completely distinct. “It’s like, 100 years later,” he says. “We change channels.”

But the opera, in Glass’s mind, has a significant place in his oeuvre.

“I think in a funny way the issues of ‘Satyagraha’ are in this opera,” he says. “But the man that wrote that was 35 years younger than the man who sits in front of you. The music of ‘Satyagraha’ is so pristine in a way. It’s so elevated. This music [in ‘Appomattox’] isn’t elevated at all. Some people are singing a ballad; some people are singing marching songs.”

And his focus has changed significantly in other ways.

“I felt that, finally, we hear King sing,” Glass says. “He doesn’t sing in ‘Satyagraha.’ I had to wait 35 years before I set him to music. Because I am me. Because I was who I am. I didn’t know anything. What I knew was very limited.”

In short, Glass’s own awareness of racial problems, although it dawned early, has taken a long time to flower — from his days growing up in segregated Baltimore and one day accidentally going into a colored men’s room, from which he was forcibly ejected, with much laughter.

“I had gone from Baltimore to Chicago to go to school,” he says, “and I got to school in Chicago, and for the first time I saw black kids in school with me. And I suddenly realized that I had never seen a black kid in school. . . . And I said, ‘Oh, that was wrong.’

“Years later, my daughter said to me, ‘But Daddy, didn’t you know?’ I said, ‘Look, when I grew up, we didn’t know.’ To be truthful, I didn’t know. I discovered it when I was 15. I said, ‘Something’s wrong here.’ ”

Wrong enough that King could serve, in “Satyagraha,” as a mute symbol of the future. “Then,” Glass says, “it took another almost 40 years before King began to sing.”

Appomattox runs for six performances, Nov. 14-22, at the Kennedy Center Opera House. Tickets: $25-$300. 202-467-4600 or www.kennedy-center.org.