Nora Ephron, who died last night at the age of 71, may have been the quintessential Manhattanite of her time. The island was her muse, and she its great romanticizer.

When the world began to think of New York City as a crime-riddled sewer, Ephron cast a glorious glow over it and kept the glow going until the city could restore the glow to itself.

Down on Houston Street, Ephron the screenwriter had Meg Ryan mimic a sexual climax while the crowd at Katz’s Deli looked on in “When Harry Met Sally.” At the 91st Street garden in Riverside Park, Ephron the writer-director had Ryan discover to her delight that her enemy Tom Hanks had been her secret e-mail crush all along in “You’ve Got Mail.” And a Baltimorean and a Seattleite magically found each other at the top of the Empire State Building at the unforgettable conclusion of “Sleepless in Seattle.”

She loved it, every inch of it, and why not? Has any city ever been better to anyone? Arriving here as a Wellesley grad in 1962, she became an unparalleled success in every realm of modern media.

She began as a kid reporter at this newspaper before graduating to the shiny pages of glossy magazines. And then it was on to early stardom only a decade after graduation as a no-nonsense personal essayist whose collections became best sellers.

“Everything is copy,” she claimed her mother, a successful playwright and screenwriter herself, had told her, and she used her own experiences as her subjects.

But unlike the solipsistic bloggers of our day, Ephron had an essentially comic view of the world and of herself — and a bull detector second to none. In the early days of what was then called “women’s lib,” she both celebrated feminism and skewered its pretensions and self-delusions — and would continue to do so throughout her life.

She made a fancy celebrity marriage to the superstar journalist Carl Bernstein, and when she discovered he was cheating on her, she turned her grief to glory in an entirely innovative manner — by writing a screamingly funny novel called “Heartburn,” which sold a zillion copies and made her a brand name.

In the novel, the Ephron character moves to Washington to be with her husband; when she finally dumps him, her return to Manhattan represents nothing less than the restoration of her sanity.

Even as she was triumphing as an essayist and a popular novelist, she was gliding into mainstream Hollywood with unprecedented aplomb. Her groundbreaking collaboration with director Rob Reiner on “When Harry Met Sally” literally reinvented the romantic comedy; then she slid carefully into the director’s chair with “This Is My Life” — an awkward but fascinating movie about the cost of a successful working woman’s ambition on her two young daughters.

And then she made “Sleepless in Seattle” — and instantly became the best-known and most successful female director in Hollywood history.

After a few flops following “You’ve Got Mail” in 1998 seemed to suggest her directing career had come to an unhappy end, she simply switched gears and published a new and New York-centric essay collection, “I Feel Bad About My Neck,” which sold millions and reminded people what a sharp-eyed and no-nonsense social critic she could be.

There was unthinking liberal guff in that book, as there always was with her — notably an offensively condescending piece about how unfair it was that the rules changed and she had to pay market rent on her massive rent-stabilized apartment. But there was also that gimlet eye, the one that didn’t allow her to romanticize anything too much.

And then, in a classic New York twist, she came roaring back with an unexpected triumph at the age of 69 — her last picture, “Julie and Julia,” was an unexpected box-office success.

Her single best bit of writing, though, may have come when she contributed to a collection of six-word memoirs. Ephron found conjugal bliss on her third try at the age of 46 with the journalist Nicholas Pileggi. It was the happy ending everyone who had followed her life wanted for her.

And this was the unforgettable way she summarized it: “Secret of life: Marry an Italian.”