CAMBRIDGE, Mass. — In the late 1970s, pop artist Andy Warhol and writer Truman Capote recorded dozens of hours of intimate conversations as the basis for a Broadway play. But the two icons moved on to other projects, the tapes were forgotten, and both men died.

On Sunday, a play inspired by their real-life dialogue – “WARHOLCAPOTE” – has its world premiere at the American Repertory Theater in Cambridge.

“It’s a lost piece of art that they started,” says Rob Roth, an award-winning New York City director who adapted the play from audiotapes he only realized were in existence after reading a cryptic reference in Warhol’s own diaries.

Directed by Tony Award-winner Michael Mayer, the play stitches together four distinct conversations from themes Warhol and Capote riffed on half a century ago.

It’s being written and staged with the support of the Andy Warhol Foundation for the Visual Arts and the Truman Capote Literary Trust.

Capote, an acclaimed novelist, screenwriter, actor and playwright best known for “In Cold Blood” and “Breakfast at Tiffany’s,” died in Los Angeles in 1984. Warhol, an avant-garde artist who gained a global following for his emblematic paintings of Campbell’s soup cans and scores of other edgy works, died three years later in Manhattan.

Roth, a lifelong Warhol groupie, says he was re-reading the artist’s diaries while relaxing on a cruise when one entry jumped out at him: “Went to Truman’s apartment. Got six good tapes for the play.”

That instantly piqued his curiosity. As he thumbed through the pages, he noticed another entry near the end of Warhol’s journal:

“Truman died and I didn’t go the funeral. But I put on those tapes we made when we were working on the Broadway play and they’re awful. I talked on them so much. I ruined them. I should have just shut up.”

Roth couldn’t believe his eyes.

“That made me go, ‘Wait a minute – he talked so much that he ruined them?”‘ Roth says in a talk posted on the Cambridge theater’s website.

He tracked down the cassettes, taped on a Sony recorder that Warhol jokingly called his “wife,” and an archivist helped sort through and examine them. The play was written using 80 hours of recordings and 8,000 pages of transcripts.

“WARHOLCAPOTE,” starring “Angels in America” Tony winner Stephen Spinella as Warhol and “Frasier” actor Dan Butler as Capote, runs through Oct. 13.