Actress Mwenya Kabwe, left, and actor Sello Sebotsane perform during a production of the play "Mountaintop" at The Market Theater in Johannesburg, South Africa. (Ruphin Coudyzer/The Market Theater)

JOHANNESBURG — In the play “The Mountaintop,” a fictional account of the night before the Rev. Martin Luther King Jr. was assassinated, an angel tells the civil rights leader not to worry about his unaccomplished goals and that his aides would carry on his struggle.

“They will know what to do,” the angel tells him. “You taught them well.”

Those words resonated deeply with South Africans attending a recent performance of the play at Johannesburg’s famed Market Theatre, a place renowned for its anti-apartheid plays under white rule. Many in the audience saw parallels to another civil rights leader and his legacy: Nelson Mandela.

As the 95-year-old anti-apartheid leader remains hospitalized with a recurring lung infection, the play reminded many of his unfulfilled dreams for their country, and that his broader ideals are bigger than one person and would hopefully outlive him.

“It reminded me a lot of Madiba,” said Neo Mohlabane, 36, referring to Mandela by his clan name, after a performance one evening. “It reminded me of how much he sacrificed his life for us.”

Since Mandela was hospitalized in June, South Africans have been soul-searching about his legacy and their country’s state of progress nearly two decades after he became South Africa’s first black president in 1994. Although the government recently said his condition had improved, he remains under round-the-clock medical care in a hospital in Pretoria.

The past few weeks have resembled a sordid play of sorts. Mandela’s family has bitterly argued over where he should be buried. Some relatives have tried to market his name and image, and some have sought control of his business interests, triggering anger and disgust among many South Africans. The public has been outraged by politicians, including President Jacob Zuma, who have attempted to gain more political clout by linking themselves to the frail national icon.

In many ways, what’s unfolding publicly reflects how human Mandela truly is — much in the same way “The Mountaintop” seeks to portray King, separating his saintly image from his flesh-and-blood faults, tackling issues of mortality and legacy.

In the award-winning play, written by Katori Hall, the Baptist minister is in his hotel room, preparing for his speech the following day, April 4, 1968, when he would be assassinated. He smokes, checks for bugs planted by the FBI and flirts with a hotel maid, a whiskey-drinking, cussing angel named Camae. He is vulnerable, admitting that he is consumed by fear.

When the angel informs him that he’s going to die, King frets about his legacy. Camae implores him to understand that the civil rights revolution that he had spearheaded will outlast him and that there will be others to carry on his work. She urges him to pass the baton.

“ ‘The Mountaintop’ is a fitting play for South Africans right now, as a reminder that the movement is bigger than the man and to give them hope that if an idea or philosophy is strong enough, it will prevail,” read a review in Business Day, a prominent local newspaper.

The actors in the play said the attention they have received because of Mandela’s hospitalization has been gratifying, if unexpected. “The timing is eerie,” said Mwenya Kabwe, 36, who plays Camae. “It’s topical in a way we did not anticipate.”

Many in the audience disagreed about whether today’s generation of leaders could pick up where Mandela leaves off. In recent years, there has been growing disenchantment with the ruling African National Congress, its leaders accused of being corrupt, ineffective and out of touch with South Africa’s impoverished masses. Zuma himself is fighting allegations of misusing public funds to renovate his private residence. Many black South Africans are still struggling with high unemployment, a lack of housing, education, clean water and other services, more than two decades after the end of apartheid and its segregationist policies.

“I can’t see anybody who has the ability to take the baton from Mandela,” said Monyake Mohlabane, 39, a civil engineer and Neo’s husband. “There is not anybody who has the same dream in our current leadership. Things will get worse before they get better.”

Briony Horwitz, 29, an actress who also watched the play one evening, noted that just as in the civil rights struggle, there were unheralded people who championed the fight against apartheid alongside Mandela.

“We need to spend a lot more time looking at who the heroes were around him,” Horwitz said. “There is this focus that Mandela ended apartheid, which is just not true. That’s the thing that happened in a celebrity-focused world, that you want an icon to make it simple. There were lots of people who joined the struggle and did great things.”