Even before he became president, Donald J. Trump was a character in the opera Anthony Davis was writing about racism and injustice, “The Central Park Five.” But the role grew as the piece was reworked for its premiere in June at Long Beach Opera.

“Bring back the death penalty!” Trump, the opera character, sings in one scene. The line comes straight out of a full-page ad that Mr. Trump took out in New York newspapers in 1989, shortly after five African-American and Latino teenagers were charged in the brutal beating and rape of a jogger in Central Park.

In the wake of breathless news coverage that stoked fears of crime and inflamed racial tensions in the city, the five men spent years in prison for the attack before another man confessed, DNA evidence backed his account, and their convictions were overturned.

Their story has already been told in books, documentaries and a new Netflix series. Now it is becoming an opera.

“The Central Park Five” is one of several new works through which American opera companies are exploring questions of race, identity, personal history and the criminal justice system, as the often staid world of opera works to catch up to other art forms. When it comes to telling diverse stories by diverse creative teams, opera has remained strikingly pale, even compared with #OscarsSoWhite Hollywood.

“I have been so thrilled seeing these operas coming out now, writing blackness into history in this unlikely place: on the opera stage,” Naomi André, a professor at the University of Michigan who wrote “Black Opera: History, Power, Engagement,” said in an interview.

The same day “The Central Park Five” opens in California, “Fire Shut Up in My Bones,” a new opera by the jazz trumpeter and film composer Terence Blanchard based on the memoir by Charles M. Blow, will open at Opera Theater of St. Louis. In July, the Glimmerglass Festival in Cooperstown, N.Y., will give the premiere of “Blue,” an opera by the Tony Award-winning composer Jeanine Tesori about an African-American family whose son is killed by a police officer.