Before the fall of apartheid, his plays, which also included “Woza Albert!” and “Asinamali,” challenged the South African government’s racial policies.Mbongeni Ngema, a South African playwright, lyricist and director whose stage works, including the Tony-nominated musical “Sarafina!,” challenged and mocked his homeland’s longtime policy of racial apartheid, died on Wednesday in a hospital in Mbizana, South Africa, after a car accident. He was 68.Mr. Ngema was a passenger in a car that was struck head on when he was returning from a funeral in Lusikisiki, in Eastern Cape Province, according to a family statement cited in the South African news media.“His masterfully creative narration of our liberation struggle honored the humanity of oppressed South Africans and exposed the inhumanity of an oppressive regime,” President Cyril Ramaphosa of South Africa said in a post on X after Mr. Ngema’s death.In the decade before the release of Nelson Mandela from prison in 1990 and the dismantling of apartheid in the early ’90s, the South African system of institutionalized racism was an overwhelming concern to Mr. Ngema. During that decade he cocreated the play “Woza Albert!,” wrote and directed the play “Asinamali!” and wrote the script and collaborated on the music for “Sarafina!”“Sarafina!” evolved out of a conversation he had in the 1980s with Winnie Madikizela-Mandela, a prominent anti-apartheid activist who was then married to Mandela.“I was sitting with Mama Winnie Mandela, and I started thinking, ‘This country is in flames,’” he told the South African television show “The Insider SA” in 2022. “So I asked a question. I said, ‘Mama, what do you think is finally going to happen to this country?’“Mama looked at me, and she said, ‘I wish I had a big blanket to cover the faces of the little ones so they do not see that bitter end.’”Mr. Ngema soon began to envision young people, running and singing “Freedom Is Coming Tomorrow,” a song that he would write for “Sarafina!,” a musical that follows Black high school students in the township of Soweto in 1976 during the uprising against the government’s imposition of Afrikaans, rather than Zulu, as the official language in schools.Mr. Ngema wrote the book and collaborated with the trumpeter and composer Hugh Masekela on the score.Mr. Ngema, left, with former President Nelson Mandela in 2002.Lewis Moon/Agence France-Presse“Sarafina!” opened in Johannesburg in 1987. It moved that fall to the Mitzi E. Newhouse Theater at Lincoln Center and then, in early 1988, to Broadway, at the Cort Theater, where it played 597 performances.In his review of the production at the Newhouse, Frank Rich of The New York Times wrote that Mr. Ngema had “brought forth a musical that transmutes the oppression of Black townships into liberating singing and dancing that nearly raises the theater’s roof.”The score, he added, “evokes the cacophony of life in a Black society both oppressed and defiant, at once sentenced to hard labor and ignited by dreams of social justice.”“Sarafina!” received five Tony nominations, including three for Mr. Ngema: for best direction of a musical (won by Harold Prince for “The Phantom of the Opera”), best original score (won by Stephen Sondheim for “Into the Woods”) and best choreography, which he shared with Ndaba Mhlongo (won by Michael Smuin for “Anything Goes”).“Sarafina!” was also nominated for best musical and best featured actress in a musical.It was adapted as a film in 1992, starring Leleti Khumalo, who had starred in the South African and Broadway productions, with Whoopi Goldberg as an inspirational teacher and the singer-songwriter Miriam Makeba as Sarafina’s mother.Mbongeni Ngema (pronounced mmm-bon-GEN-i nnn-GAY-ma) was born on June 1, 1955, in Verulam, a town north of Durban.According to his official biography for the film “Sarafina!,” he was separated from his parents at 11, then lived for a time with extended family in Zululand and later on his own in the poor neighborhoods around Durban. From age 12, he taught himself to play guitar.“When I grew up all I wanted to be was a musician, and I was influenced greatly by the Beatles,” he said on “The Insider SA.”Working in a fertilizer factory in the mid-1970s, a fellow worker asked him to play guitar to accompany a play he had written.“And then I fell in love with the part of the lead character in the play,” he told the magazine Africa Report in 1987. “When he was onstage, I would mimic him backstage — making the other musicians laugh.” One night, when the actor did not show up, he played the role.Mr. Ngema and the playwright began to collaborate, which led Mr. Ngema to start directing and writing his own small pieces. In 1979, he began working in Johannesburg with Gibson Kente, a playwright and composer, to understand the magic in his productions. After two years, he left and began working with the performer Percy Mtwa.He, Mr. Mtwa and Barney Simon created “Woza Albert!,” a satire that imagines the impact of the second coming of a Christ-like figure, Morena, who arrives in South Africa on a jumbo jet from Jerusalem, through the lives of ordinary people, vigorously played over the course of 80 minutes by Mr. Ngema and Mr. Mtwa.The white government tries to exploit Morena, then labels him a Communist and locks him up on Robben Island, where Mandela and other political prisoners were incarcerated.The play opened in South Africa in 1981 and was staged over the next three years in Europe, Off Broadway at the Lucille Lortel Theater and around the United States.In The Washington Post, the critic David Richards wrote in 1984 that “Woza Albert!” “tackles such harsh realities as injustice, poverty and apartheid in South Africa, but does so with far more spirit, humor and, yes, hope, than the subject generally inspires.” He added that “with only their wonderful, wide-eyed talent,” Mr. Mtwa and Mr. Ngema “can summon up a landscape, a society, a history.”The trumpeter Hugh Masekela, third from right, with members of the cast of “Sarafina!” during a rehearsal at Lincoln Center in 1987. Mr. Masekela and Mr. Ngema collaborated on the score for the musical.Sara Krulwich/The New York TimesMr. Ngema then wrote and directed “Asinamali!” (1983), in which five Black men in a single South African prison cell describe — through acting, dancing, singing and mime — why they were incarcerated and how they were victimized by racist laws, unemployment and police violence.The play’s name (which means “We have no money”) comes from the rallying cry of rent strikers in 1983 in the Lamontville township.Mr. Ngema said that “Asinamali!” was alarming enough to authorities in Duncan Village, in the Eastern Cape, that they arrested the audience for attending a performance.“They said it was an illegal political gathering,” Mr. Ngema said in an interview in 2017 on a South African podcast.He called “Asinamali!” a celebration of resistance.“It shows that no matter how bad things get, victory is inevitable,” he told The Times in 1986 during rehearsals before the play opened in Harlem at the New Heritage Repertory Theater. “The spirit of the people shall prevail.”Later that year, “Asinamali!” was part of a South African theater festival at Lincoln Center.Information on Mr. Ngema’s survivors was not immediately available. His marriage to Ms. Khumalo, the star of “Sarafina!,” ended in divorce. Mr. Ngema, who wrote several other plays, was involved in a controversy in 1996 when his sequel to “Sarafina!,” “Sarafina 2” — commissioned by the South African Health Department to raise awareness about the AIDS epidemic — led to a government corruption investigation over accusations that its cost was an excessive “unauthorized expenditure” and that its message was inadequate.He defended the show’s price tag, saying it was necessary to bring Broadway-quality shows to Black townships.“People have said it’s a waste of government money,” Mr. Ngema told The Associated Press in 1996. “It think that’s a stupid criticism.” More