This article has been corrected. See note at the bottom for details.

Nora Ephron, who cast an acerbic eye on relationships, metropolitan living and aging in essays, books, plays and hit movies including “Sleepless in Seattle,” “When Harry Met Sally...” and “Julie & Julia,” died Tuesday in New York. She was 71.

Ephron died at New York Presbyterian Hospital, where she was being treated for acute myeloid leukemia and pneumonia, said her close friend and Washington Post columnist Richard Cohen.

A rare author and screenwriter whose works appealed to highbrow readers and mainstream moviegoers, Ephron wrote fiction that was distinguished by characters who seemed simultaneously normal and extraordinary. Like many people, they wrestled with commitment, principles and fame, but often exhibited keen, comic insights about their predicaments.

Her protagonists, who included the chef Julia Child and the whistle-blower Karen Silkwood, were often women and typically were just as capable as the men around them, if not more so.

Ephron directed eight feature films, including “Sleepless in Seattle” and “You’ve Got Mail” (both featuring Tom Hanks and Meg Ryan) and had screenplay credits on more than a dozen productions. She earned three Oscar nominations — for writing “Sleepless in Seattle,” “When Harry Met Sally...” and “Silkwood.” As a playwright, she wrote “Imaginary Friends” and, with her sister Delia, “Love, Loss, and What I Wore.”

Ephron also wrote extensively about her own life, often in a sly, self-deprecating style. Her books included “I Feel Bad About My Neck: And Other Thoughts on Being a Woman,” “I Remember Nothing: And Other Reflections,” “Crazy Salad: Some Things About Women,” “Wallflower at the Orgy” and “Heartburn,” a roman à clef about her marriage to Watergate journalist Carl Bernstein. The 1983 novel was so withering in its depiction of her former husband (the loosely fictionalized book character was “capable of having sex with a Venetian blind”) that Bernstein threatened legal action.

Even though she wrote strong female characters and said male filmmakers had little interest in women besides “girlfriends or wives,” Ephron’s brand of feminism was winking rather than strident. At a Hollywood awards event several years ago, she looked about the room and said, “When they write the history of the feminist struggle in America, I always wonder how this lunch will exactly fit in. We are definitely the best-dressed oppressed group.”

In a business that seems to have little room for women past middle age, Ephron continued to work steadily. “Julie & Julia,” a film biography of chef Julia Child told through the eyes of a young admirer, was released when she was 68. Adapted from Child’s autobiography and a cooking memoir by Julie Powell, the film was the best-reviewed of her career, and took in nearly $95 million at the U.S. box office. At the time of her death, she was writing and hoped to direct a movie about a Jane Austen fan who switches places with one of the British author’s fictional characters. She also had been developing a movie about the singer Peggy Lee and the play “Lucky Guy” about crime reporter Mike McAlary for frequent collaborator Hanks.

Yet she did not ignore her own mortality.

“You do get to a certain point in life where you have to realistically, I think, understand that the days are getting shorter, and you can’t put things off thinking you’ll get to them someday,” she wrote in “I Remember Nothing,” published in late 2010. “If you really want to do them, you better do them. There are simply too many people getting sick, and sooner or later you will. So I’m very much a believer in knowing what it is that you love doing so you can do a great deal of it.”

Ephron was born May 19, 1941, in New York City and grew up in Beverly Hills, the oldest child in a family of writers. Her parents, Henry and Phoebe Ephron, wrote screenplays, and based Sandra Dee’s college girl character in the 1963 comedy “Take Her, She’s Mine” on Nora’s letters home from Wellesley College in Massachusetts. Ephron’s sisters Delia and Amy are also screenwriters, while sister Hallie is a journalist.

After graduating in 1962, Ephron worked for a short time as an intern in the White House during the presidency of John F. Kennedy. She said she was “probably the only young woman who ever worked in the Kennedy White House that the president did not make a pass at.” She then pursued a career as a journalist, starting as a mail clerk at Newsweek, then as a reporter at the New York Post.

In 1968, she left the Post, eventually writing monthly columns in the 1970s for Esquire and New York magazines. She promptly established a sharp and witty voice as a writer. In a 1972 essay called “A Few Words About Breasts,” Ephron wrote, “If I had them, I would have been a completely different person.”

Many of the pieces she wrote for these magazines — stylish, opinionated, with a kind of take-no-prisoners fearlessness rooted in both the women’s movement and the equally complex terrain of her own emotions — were collected in three books of essays, “Wallflower at the Orgy” (1970), “Crazy Salad: Some Things About Women” (1975) and “Scribble, Scribble: Notes on the Media” (1979).

“The women’s movement,” she once noted, “may manage to clean up the mess in society, but I don’t know whether it can ever clean up the mess in our minds.”

Ephron’s first marriage, to writer Dan Greenburg, ended in divorce. In 1976, she married her second husband, Washington Post journalist Bernstein, and moved to Washington. Three years later, while she was pregnant with their second child, she discovered that Bernstein was having an affair.

Stunned and embarrassed — “I think the feeling I like least in the whole world,” she would later tell Vanity Fair, “is feeling dumb” — she left Bernstein and returned to New York, where she wrote her first novel, “Heartburn.”

At the behest of Bernstein, Ephron had helped rewrite William Goldman’s script for the 1976 big-screen adaptation of “All the President’s Men.” Though that version wasn’t used, Ephron’s work earned her first paid screenwriting job on a TV movie called “Perfect Gentlemen.” Her next script, for “Silkwood,” a 1983 drama about a female whistle-blower at a nuclear power plant, earned an Oscar nomination.

After “Silkwood,” Ephron’s film career veered more toward the personal and comedic, beginning with the 1986 adaptation of “Heartburn,” which starred Jack Nicholson and Meryl Streep. “I highly recommend having Meryl Streep play you,” Ephron said. “If your husband is cheating on you with a carhop, get Meryl to play you. You will feel much better.”

In 1987, she married her third husband, the writer Nicholas Pileggi.

It was in 1989, with the release of “When Harry Met Sally,” that Ephron firmly established herself as Hollywood’s mother of the modern romantic comedy, carrying the escapist, fast-paced style of 1930s screwball comedies into the 20th century by tackling subjects like divorce and email. She said that all romantic comedies were essentially mash-ups of Shakespeare’s “The Taming of the Shrew” and Austen’s “Pride and Prejudice,” but Ephron injected the formula with a populist, somewhat sentimental flavor.

“There’s a thing I wrote in ‘Heartburn’ that I can’t remember exactly, but it says that no one is more romantic than a cynic, or something like that,” Ephron said in an interview with The Times several years ago. “I do think that you don’t become cynical or ‘unsentimental’ unless there’s a core of romanticism or sentiment that’s had a few chips nicked into it. Is every cynic a romantic at the core, or are some cynics cynics at the core? I don’t know. Probably there are.”

Through the early 1990s, with Ryan and Hanks as her amorous muses, she enjoyed her biggest box office successes with “Sleepless in Seattle” and “You’ve Got Mail.” Critics, however, often regarded Ephron’s films lightly — of “Sleepless,” the New York Times’ Vincent Canby wrote: it’s “a movie you may hate yourself in the morning for having loved the night before.”

For all of her passions, few exceeded her love of cooking. She collected and distributed to her closest friends a collection of recipes, one of which was for the chili from Chasen’s, a now-shuttered show business haunt in West Hollywood. “There is almost nothing I ever do that won’t stop dead if someone needs a recipe for something,” Ephron once said.

Ephron’s survivors include Pileggi; her sons from her second marriage, Jacob and Max Bernstein; and her three sisters.

[For the Record, 9:39 p.m., June 26: Earlier, it was stated that Nora Ephron was working on the play “Lucky Guy” about crime reporter David McAlary. The crime reporter is named Mike McAlary.]

PHOTOS: Notable deaths of 2012



john.horn@latimes.com

rebecca.keegan@latimes.com

Times staff writer David Ulin contributed to this report.