When Stephanie Prentice, as Sonia Sotomayor in Tuesday’s opening night of Marin Theatre Company’s “Justice: A New Musical,” sang the lyric “I need that hope today, right now,” she meant it in more ways than one. It came moments after, as herself, not in character, she declared to the audience, “This is like ‘The Actor’s Nightmare’” when the show stopped at the outset due to power outages caused by fierce winds blowing in Mill Valley.

But the world premiere’s bumpy start wasn’t all bad. It gave the audience the opportunity to meet “Justice’s” creative team —Lauren M. Gunderson (book), Bree Loudermilk (music) and Kait Kerrigan (lyrics) came onstage to discuss the project’s origins—as stage manager Nick Carvalho and the crew hustled to reset the lighting and sound system.

And they did so with rousing success. The same could be said for the musical itself, an enlightening, engaging tale about the first three female U.S. Supreme Court justices. It’s not just a melodic history lesson filled with famous facts and less known tidbits, it’s also packed with heart and soul.

Stephanie Prentice is Sonia Sotomayor, the Supreme Court’s first Latina jurist, in “Justice: A New Musical.” (Photo by Kevin Berne)

Prentice’s Sonia is the narrator of sorts, describing the trailblazing, yet very different, women who came before her. Sandra Day O’Connor, an Episcopalian Republican from Texas and Arizona was not known for rocking the boat; Ruth Bader Ginsburg, a Jewish Democrat from New York, was famous for consistent, outspoken liberal views.

Both were victims of sexism, both pushed for increasing women’s rights.

“Justice: A Musical” illustrates with vigor just how O’Connor, the former ranch girl whose swing vote ultimately put George W. Bush in the White House after election battles with opponent Al Gore; and Ginsburg, a bona fide celebrity at age 84 whose collars were as well-known as her activist opinions, became an unlikely sisterhood.

And Sotomayor, who made history as the first Latina justice, but didn’t sit on the bench at the same time as O’Connor, rounds out the show’s metaphorical trio of legal siblings.

Directed by Ashley Rodbro and accompanied by offstage keyboardists Ruiran Xun and Matthew Zwiebel, the singing actors are true heroines.

As the no-nonsense Sandra, Karen Murphy shines in tunes describing her strategy (“After years of rejections, you make connections; never explain, never complain; get it first, get it right, get it done”) and, toward the end of her career, challenges with husband’s dementia and her own (“When the mind goes”).

As the diminutive (in stature, not ideas) Ruth, Lynda DiVito belts a few powerful numbers, too, commanding in “I’ll show the public why they let me in”; proclaiming herself “notorious” and insisting that a woman’s place is in the room where decisions are made.

Prentice’s Sonia gets great moments in the spotlight as well: Upon her difficult yet successful Senate confirmation hearing in 2009, she proudly, gorgeously sings, “the future becomes the present, the possible becomes real.”

While the moments of triumph in “Justice: A New Musical” indeed are thrilling and uplifting, the show wisely confronts reality, particularly in another powerful number about Ruth and Sonia’s dismay at continuously writing dissenting opinions in cases that strip away ordinary people’s civil rights and freedoms, and when the woman who filled Ruth’s seat on the bench after her death espoused views opposite those of the beloved leftist jurist.

Karen Murphy, left, as Sandra and Lynda DiVito as Ruth have a heart-to-heart restroom talk in Marin Theatre Company’s “Justice: A New Musical.” (Photo by Kevin Berne)

Relief comes in the form of Obergefell v. Hodges, which recognized same-sex marriage, and the 2022 appointment of the first Black woman justice, Ketanji Brown Jackson.

Deftly dealing with the legal landscape, “Justice’s” set design by Carlos Aceves includes handy projections flashing the names of judges’ notable cases and decisions on a backdrop reminiscent of the court building.

The show also touches on personal issues. There are humorous scenes in the women’s bathroom with funny, pop up faucets; and touching, sometimes melancholy, moments when Ruth and Sandra pay homage to their husbands.

Still, these amazing women’s political will is what gives “Justice” its main appeal. So when, near the show’s close, Sonia laments how freedom is eroding in America today but that you must carry on, we heartily agree when she adds, “I say, let’s fight.”

“Justice: A New Musical” continues through March 12 at Marin Theatre Company, 397 Miller Ave., Mill Valley. Tickets are $25-$65; visit marintheatre.org or call (415) 388-5208.