The project also includes ‘Black-ish’ writer Peter Saji, and takes its cue from the critically acclaimed musical episode that kicked off the ABC comedy-drama’s fourth season.

What might have been just another sitcom creative stunt designed to shake up the energy at the start of a new season is now instead evolving into an ambitious new project that could even turn out to be the next Hamilton.

Following the critical success of “Juneteenth: The Musical,” the season-four opener of ABC’s Black-ish, the show’s creator, Kenya Barris, and one of its writers, Peter Saji, will team up with multiple Grammy-winning music producer Pharrell Williams on a stage musical inspired by Juneteenth, the African-American holiday widely recognized as the final day of slavery in the U.S.

In the TV episode, an 1865 version of the show’s African-American family, the Johnsons, sang and danced to celebrate the liberties stretching out before them on June 19, the day U.S. Army ships descended on Texas, forcing landowners to free the last of the Confederate state’s estimated 250,000 enslaved people, two years after the Emancipation Proclamation was issued.

The subversively funny, sharply double-edged episode became an instant classic, cleverly linking 21st-century African-American middle-class reality to the country’s brutal past of exploitation and suffering. Since the episode aired last fall, the date is now commemorated on Apple’s iCalendar program, and a movement is gaining momentum to make Juneteenth a national holiday.

Barris and Saji will write the book for the new musical project, with Williams on board to compose the score and produce under his company i am OTHER, with partner Mimi Valdes. Saji also will serve as a producer.

Plot details have not been revealed, but the musical is expected to follow a similar template to the Black-ish episode, focusing on two African-American families — one in contemporary times and the other in the Civil War era.