Kevin Paredes/Photography Editor Agnes, played by Margaret Leisenheimer, a junior majoring in theatre, in a scene from “Castle on the Hill.” The show, which opens on April 27, is written and directed by Elizabeth Mozer, an assistant professor of theatre at BU.

“Castle on the Hill,” the last Mainstage play of the semester, addresses the history of mental health treatment through the lens of a chapter of the Binghamton area’s history.

The Binghamton State Hospital, which opened its doors in 1864 at 125 Robinson St., was the nation’s first institution constructed to treat alcoholism as a mental disorder. The playwright and director of the show, Elizabeth Mozer, an assistant professor of theatre at BU, adapted the play from her one-woman show, “The Asylum Project,” which is set at this historic site.

“It’s so interesting, this idea of what we consider acceptable at any time in our culture from time period to time period,” Mozer said. “When we look at this [idea], it helps us reflect on our own time period and what kind of people or actions or behavior we are ostracizing or marginalizing and determining as an illness when it may not be an illness at all.”

“Castle on the Hill” revolves around the lives of Agnes and Lina, two women who are faced with confronting their inner demons at the asylum. Set in two different time periods, the audience sees the ways in which these characters’ respective eras affect how they unpack their issues — but even more conspicuously, the things the women have in common.

Agnes, played by Margaret Leisenheimer, a junior majoring in theatre, is a Polish immigrant living in the 1920s who becomes a patient at the asylum. Lina, played by Christine Skorupa, a sophomore majoring in theatre, is a woman undergoing psychotherapy treatment in the city of Binghamton in the 1970s and is grappling with the death her mother, whom she never met.

“I think my character really brings such a new face to determination and the importance of, as cliche as it sounds, the importance of love,” Skorupa said. “I think she carries a message of determination and such groundedness in that … there’s such a mystery surrounding her past and through all of this determination, she benefits from it.”

While the main plot follows Agnes and Lina, a part of the show’s narrative is composed of a series of shorter, individual stories that contextualize different patients’ paths to the Binghamton State Hospital.

“We get to hear more stories from people who are generally considered outsiders,” Mozer said. “I was able to use pretty much all of the same text [from “The Asylum Project”] and interweave it into this new play. The ending’s different. I’ve added scenes. In the play, as you’ll see, there are these rooms with silhouettes where you see patients. And you just see their physical activity, so it’s a lot of physical text that we’re viewing.”

From “The Asylum Project,” this new play has been adapted so a cast of 12 actors play a total of 22 characters portrayed on stage, including anonymous patients, a nurse, an attendant, family members of the patients, a transgender man, a sexual assault survivor and a deaf woman. Throughout the rehearsal process, the actors conducted their own extensive research to better understand the experiences of those struggling with mental illness, as well as topics like World War I and immigration in the United States.

“It’s been such an honor and a privilege to get to tell their stories,” Leisenheimer said. “I remember sitting in the library — we had gotten some articles about Agnes that had been sent. An article had been written about her in People magazine. I broke down crying. I’m sitting in the middle of the PODS, sobbing. It was a really funny moment for me to realize how invested I was, that I didn’t care that I was bawling in the middle of the library. It was a very humbling experience to get to share these stories with people.”

By shedding light on mental illness and portraying a roster of characters based on real patients, Mozer said said she hopes to highlight past and present perceptions people hold over those deemed unfit to function in society.

“I’m just really hoping that the conversation can remain open, that we can look at how we can support each other,” Mozer said. “Our own personal mental health and those who might need more assistance, and how our campus itself can progress in that area.”

“Castle on the Hill” runs in Watters Theater in the Anderson Center on April 27, 28 and May 4 at 8 p.m., with matinee performances on April 29 and May 6 at 2 p.m. On April 29 and May 4, there will be postshow talkbacks with the audience, Mozer and the cast. Tickets are $18 for general admission, $16 for alumni, faculty, staff and seniors and $10 for students. Discounted student tickets are available for $5 at the Anderson Center Box Office for the Friday, April 27 performance.