Stephen Sondheim has been awarded the 2017 PEN/Allen Foundation Literary Service Award — making him the first composer-lyricist to win it.

The prize is given annually to a “critically acclaimed writer whose body of work helps us understand and interpret the human condition,” according to PEN America’s news release. While the prize has mostly gone to novelists, including Salman Rushdie and Toni Morrison, Mr. Sondheim has made an undeniable impact on the last 60 years of culture by writing musicals including “West Side Story,” “Sweeney Todd” and “Company.”

And the precedent for giving a literary award to a musical artist was strengthened last year, when Bob Dylan accepted the Nobel Prize for Literature.

“Stephen Sondheim has really given voice to complex aspects of the human spirit: to nuance, to psychology, to inner voices,” Andrew Solomon, president of PEN America, said in a phone interview. “His work points to the significance of living a moral life, and that’s never felt more urgent than right now.”

Mr. Sondheim will be honored by PEN on April 25 at the American Museum of Natural History, with Meryl Streep presenting the prize. She starred in the 2014 film adaptation of Mr. Sondheim’s “Into the Woods,” and received an Oscar nomination for her role.

This weekend Mr. Sondheim’s work will be back on Broadway, with a revival of the Pulitzer Prize-winning “Sunday in the Park with George” starring Jake Gyllenhaal. And he’s working on a new musical inspired by the works of Luis Buñuel, tentatively slated to arrive at the Public Theater sometime this year.

J. K. Rowling, the creator of the Harry Potter books, received the award last year; she spent part of her acceptance remarks defending Donald J. Trump’s right to free speech, while nevertheless calling him “offensive and bigoted.”