An unperformed play by the Peter Pan author JM Barrie that has languished in a Texas archive for half a century is to be published for the first time.

The play, entitled The Reconstruction of a Crime, was found in Barrie’s archives at the Harry Ransom Center in Austin, Texas, where the catalogue describes it as “a sensational scene”, in which the audience is requested to assist one “Mr Hicks … in the detection of the criminal”. It takes its bow alongside new fiction from Ruth Ware, Jo Nesbø and Charles Todd in the Strand magazine, an American journal that has previously unearthed work by writers such as Mark Twain and Tennessee Williams.

“The story is a bedroom farce, and has a gag that might easily have found its way into an episode of Fawlty Towers,” said Strand editor Andrew Gulli. “It’s not to be confused with a play he penned for a first world war benefit titled Reconstructing a Crime. We were all set last issue to publish the play we are publishing when our copy editor brought our plans to a screeching halt after finding that a play with a similar title premiered once. So, we ended up getting a copy of Reconstructing a Crime and we were ecstatic that it was 100% different.”

Gulli said that The Reconstruction of a Crime, which the Scottish novelist and playwright co-wrote with his friend, the humourist EV Lucas, had been in the archives of the Ransom Library for 40 or 50 years. “It is unclear why he never had this play premiered – it might have been during a period where he was penning more serious dramas,” said Gulli. Barrie is best known today as the creator of Peter Pan, his play about a boy who never grows up. That play was first performed in 1904 and later adapted by Barrie into a novel in 1911.

The Reconstruction of a Crime opens with a character called “the Victim” putting his head through the curtain and asking the audience for quiet: “Please don’t applaud,” the Victim begins. “Of course I like it; we all like it. But not just now. This is much too serious. The fact is, I want to take you into my confidence: to ask your assistance. A horrible crime has been committed. An outrage almost beyond description has been perpetrated upon an inoffensive gentleman staying in a country hotel, and the guilty person has to be found.”

Later the Victim calls the hotel’s front desk: “Is this the office? I’m dying. Who is it? Number 53. He’s dying. I’m dying. Number 53 is dying. Is there a doctor anywhere near? What? One staying in this hotel? Thank God! Send him to me at once. And a lawyer. I want a lawyer. There isn’t one? What a rotten hotel. I want to make my will. I’m dying, I say. Number 53’s dying.”

According to the Ransom Center the play is undated and runs to 33 pages.