Tom Jones, who wrote the book and lyrics for the longest-running musical “The Fantasticks,” died Friday at his home in Sharon, Conn. He was 95.

Jones’ son Michael told The New York Times the cause was cancer.

Jones and the late composer Harvey Schmidt created the musical allegory “The Fantasticks,” which opened in 1960 in Greenwich Village and ran off-Broadway for a staggering 42 years. The musical is known for its opening song, “Try to Remember.”

Jones was born in Littlefield, Texas, on Feb. 17, 1928. He attended the University of Texas at Austin, where he first met his longtime collaborator Schmidt.

After serving in the Korean War, Jones moved to New York and began his theater career by writing for the revues being staged by the impresario Julius Monk. He also worked with composer John Donald Robb, with whom he developed “Joy Comes to Deadhorse,” a musical western loosely based on Edmond Rostand’s 1894 play “Les Romanesques.” The two had a falling out over creative differences, so Jones turned to Schmidt to continue working on the piece, which eventually evolved into “The Fantasticks.”

In 1959, Jones and Schmidt presented a one-act, pared-down version of their show as “The Fantasticks” at a summer festival at Barnard College. Producer Lore Noto saw the production at Barnard and brought the musical, expanded to two acts, to the Sullivan Street Playhouse in Greenwich Village, where it opened on May 3, 1960. The original cast included Jones as Henry, the Old Actor, and Jerry Orbach as El Gallo, the narrator, who performs “Try to Remember.”

Although “The Fantasticks” received mixed reviews, the musical ran at Sullivan Street for more than 17,000 performances until 2002, making it the longest-running musical in U.S. history.

In addition to “The Fantasticks,” Jones and Schmidt worked together on “I Do! I Do!” and “110 in the Shade,” which opened on Broadway in 1963 and ran for 330 performances. Jones earned Tony nominations for “I Do! I Do!” and “110 in the Shade,” and won the Drama Desk Vernon Rice Award for “The Fantasticks” in 1961.

A revival of “The Fantasticks” opened in 2006 and ran for more than 4,300 performances until 2017. The off-Broadway production was directed by Jones, who also reprised his role as Henry, the Old Actor.

Jones is survived by his sons Michael and Sam Jones from his second marriage to choreographer Janet Watson, who died in 2016.