A talented and well-known independent-film actress, director and screenwriter apparently hanged herself in a Greenwich Village apartment, cops said yesterday.

“Why? Why?” screamed the husband of Adrienne Shelly, 40, after finding her body dangling from a shower rod in the bathtub of the Abingdon Square Park one-bedroom that she sublet to a friend and used as an office.

Shelly, who appeared earlier this year in the film “Factotum” starring Matt Dillon, was on the verge of releasing her latest directorial effort, a film called “Waitress,” when she died Wednesday.

The petite blonde, born Adrienne Levine, was best known for her deadpan comic delivery and early lead roles in two Hal Hartley-directed films set in her native Long Island – “The Unbelievable Truth” and “Trust,” both independent cult classics.

Law-enforcement sources said they are inclined to believe Shelly’s death – which for now remains unclassified by the medical examiner – was a suicide, noting there was no sign of struggle or forced entry at the fourth-floor apartment.

But the actress left no note, and cops were investigating sneaker prints in the tub that did not match Shelly’s shoes.

Shelly, a TriBeCa resident who had a 3-year-old daughter named Sophie, spoke in recent months of her hopes to have another child with her marketing-exec husband, Andrew Ostroy.

In 1996, she told a magazine how her father rebuffed talent agents hoping to sign her as a child actress by saying, “I will not have my daughter jumping out of a window when she’s 30.”

And in a 2002 interview, the actress said she had “gone through life with this feeling that life could end at any given moment,” adding she would not accept delays in producing her film projects “because in my way of thinking, I might not live another seven years.”

Shelly’s death stunned family and friends who said there was no indication she was troubled.

“The family is devastated. She was the star of the family. Everyone loved her very much,” cousin Randi Alexander said.

A family source said Shelly “wasn’t on any medication. She doesn’t drink, and she was a pretty happy person. Everyone is having trouble accepting this as a suicide.”

A doorman at the Abingdon Square building told The Post that Shelly’s husband arrived there just before 6 p.m. Wednesday and “said he was really worried about her. He said he dropped her off that morning at 10 or 10:30.”

“He hadn’t heard from her, and he said it was odd not to hear from her, so he was nervous. And he asked me to go up to the apartment with him, so we went to the front door, and it was unlocked.”

“He ran into the apartment. I just held back. Once he got to the back of the apartment, he just started screaming . . . and crying, ‘Why? Why?’ – asking himself, or just asking her,” the doorman said.

Ostroy, chairman and CEO of Belardi/Ostroy ALC, declined to comment.

Although Shelly’s performances in films subsequent to her last movie with Hartley in 1990 received much less attention, she later expanded into writing and directing films, including 1999’s “I’ll Take You There,” which starred Ally Sheedy. Her new film, “Waitress,” which stars Keri Russell and Andy Griffith, also features Ostroy in a small role.

“Factotum” producer Jim Stark said that when he told mutual friends Shelly was dead, “they couldn’t believe it.”

“It’s a great loss to all of us who are fans of independent film,” Stark said. “She was extremely intelligent. A beautiful, young woman.”

Additional reporting by Jennifer Fermino and Bill Hoffmann