NEW YORK – Patti LuPone tells the story of the time Arthur Laurents violated theater folklore: The director, playwright and screenwriter had unwittingly uttered the word “Macbeth” backstage during the 2008 Broadway revival of “Gypsy.” As most drama buffs know, saying the title of Shakespeare’s play spells unfortunate luck for a production.

Soon things started to go bad inside the St. James Theater — curtains got snarled, an actor fractured her pelvis. To the superstitious cast, only Laurents could break the curse.

So one night, LuPone insisted that Laurents — the three-time Tony Award winner responsible for the books to “Gypsy” and “West Side Story” — go through a specific ritual that involved spitting, cursing and turning around counterclockwise on the street in front of the St. James. She shoved him out the door and he did it.

“He really didn’t understand what was going on,” LuPone said Friday following the death at age 93 of her friend. “If anyone knows that’s Arthur Laurents, they’re going to think he lost his mind.”

It apparently worked: The production won Tonys for LuPone, Laura Benanti and Boyd Gaines. Laurents, who died Thursday, had proved yet again that he would do what it took to make a musical work.

“He humored me,” LuPone said. “He laughed and I think he enjoyed a theatrical moment. You know, when he gets that gleam in his eye, it’s pretty fabulous. His whole body lights up.”

The marquees of the St. James Theater — as well as all of Broadway’s theaters — were to be dimmed Friday at 8 p.m. in honor of Laurents, who died in his sleep in his New York City home.

He was a man who transformed Shakespeare’s “Romeo and Juliet” into a story about rival New York gangs and who followed it up by turning the story of a stripper into the quintessential American musical. He was also the screenwriter for the weepy film classic “The Way We Were” and helped discover Barbra Streisand.

“Rest easy, if doing anything the easy way is possible for you, Arthur,” tweeted Harvey Fierstein. “Hell, you couldn’t even just slide down a hill. You had to make sport.”

Laurents’ “West Side Story” opened on Broadway in 1957, and two years later, Laurents and Jerome Robbins teamed up again for “Gypsy,” based on the memoirs of stripper Gypsy Rose Lee. As Rose, Ethel Merman had the greatest triumph of her career.

Laurents’ credits as a stage director also include “I Can Get It for You Wholesale,” best remembered as the musical that introduced a 19-year-old Streisand to Broadway in 1962, and “La Cage Aux Folles” (1983).

Laurents was born in Brooklyn, the son of an attorney. He attended Cornell University and after graduation began writing radio plays including scripts for such popular series as “Dr. Christian” and “The Thin Man.”

While serving in the Army during World War II, Laurents wrote military training films as well as scripts for military radio programs.