Lillian Ross, whose innovative journalism appeared in the New Yorker magazine for eight consecutive decades and whose profiles and articles were considered forebears of the nonfiction novel and unsparing modern celebrity profile, died Sept. 20 at a Manhattan hospital. She was 99.

The cause was a stroke, said her longtime New Yorker editor, Susan Morrison.

Ross began working at the New Yorker in 1945, when the weekly magazine was guided by its founding editor, Harold Ross (no relation), and teemed with a dazzling array of literary talent, including Janet Flanner, A.J. Liebling, Joseph Mitchell, S.J. Perelman and E.B. White.

Her deepest attachment was to the magazine’s longtime editor, William Shawn — a relationship she detailed in a memoir that revealed her decades-long love affair with the soft-spoken editor, who was married to another woman the entire time.

Ross wrote about athletes, the Miss America pageant and street-wise high school students, but she gained particular renown with her straightforward 1950 profile of novelist Ernest Hemingway that many readers initially found cruelly unflattering.

Two years later, her book “Picture,” a behind-the-scenes exploration of filmmaking, became known as perhaps the first nonfiction novel and a model for later literary works by Truman Capote, Norman Mailer and other writers.

Short, blunt and tirelessly observant, Ross was equipped with a supply of 3-by-5-inch notebooks and a sharp ear for speech. One of her New Yorker colleagues, humorist James Thurber, called her “the girl with the built-in tape recorder” for her ability to capture dialogue with pen and paper.

Among the hundreds of articles she wrote for the magazine were memorable portraits of diamond merchant Harry Winston, fashion designer Coco Chanel, playwright Edward Albee and film stars ranging from Charlie Chaplin to Robin Williams.

Her most acclaimed early subject was Hemingway, whom she accompanied in 1950 on his short visit to New York. Hemingway often had a drink in his hand and sometimes spoke in a peculiar, clipped form of pidgin English, even when describing his own fiction: “Book start, then increase in pace till it becomes impossible to stand. … Book is like engine. We have to slack her off gradually.”

He occasionally blurted, “How do you like it now, gentlemen?” which became the title of the story.

Yet Ross also recorded Hemingway’s poignant reflections on the nature of writing and mortality.

“I have seen all the sunrises there have been in my life, and that’s half a hundred years,” he said. “I wake up in the morning and my mind starts making sentences, and I have to get rid of them fast — talk them or write them down.”

Ross gave Hemingway an advance look at the story — a practice frowned on today — yet many of his devotees were incensed. By pulling back the curtain and showing Hemingway’s all-too-human frailties, Ross expanded the range of the celebrity profile.

“It was a warts-and-all treatment,” Ben Yagoda, the author of “About Town,” a history of the New Yorker, said in an interview. “That kind of thing wasn’t being done at the time. The techniques she used, with scenes and the ‘fly-on-the-wall’ reporting, were traditionally more associated with fiction writing. It was one of those pieces in the New Yorker that really caught the public’s attention.”

Ross described her narrative style as cinematic, written in a series of scenes that revealed character. She often wrote about the world of movies, most arrestingly in “Picture,” an inside look at the making of the 1952 film “The Red Badge of Courage” based on Stephen Crane’s novel about the Civil War.

Ross gained access to everyone involved in the film, including director John Huston and Metro-Goldwyn-Mayer executives Louis Mayer and Dore Schary — at a time when Mayer and Schary were battling for control of the studio.

Ross soon recognized that Huston’s artistic ambition and the studio’s emphasis on the bottom line were bound to collide, giving her an opportunity for a new method of storytelling.

“I don’t know whether this sort of thing has ever been done before,” she wrote in 1950 to Shawn, her editor, “but I don’t see why I shouldn’t try to do a fact piece in a novel form, or maybe a novel in fact form. It’s an exciting thing to think about. It’s almost as though the subject material calls for that kind of form.”

Admitted to Mayer’s sumptuous office, Ross noticed that everything — the fireplace, chairs, leather walls, a grand piano — was the color of cream. Even his desk, she wrote, “was covered with four cream-colored telephones.”

Mayer, soon to be ousted from the studio he helped found, was complaining about “the smart alecks around here” who sought to make an artistic statement with film, rather than aim for the heart.

He recalled how Huston had been pulled off the Roman epic “Quo Vadis” early in the film’s production.

“What he wanted to do to the picture! No heart,” Mayer said. “I begged him to change his ideas. I got down on my hands and knees to him. I sang ‘Mammy’ to him. I showed him the meaning of heart. I crawled to him on hands and knees. “Ma-a-ammy!’ With tears. No! No heart!”

Ross’ story was published in five installments in 1952 and appeared later that year in book form. A Newsweek reviewer called it “the best book on Hollywood ever published.” More than 60 years later, New Yorker editor David Remnick said it was “Ross’ masterpiece.”

In an introduction to Ross’ 2015 book “Reporting Always,” Remnick wrote that “Picture” was a forerunner to Mailer’s “Armies of the Night” and Capote’s “In Cold Blood” and was crucial to “the invention of the nonfiction novel.”

Ross was wary of revealing too much about her methods, except to say that “a reporter is always chemically involved in a story.”

Before Capote wrote “In Cold Blood,” his 1966 book about the killing of a Kansas farm family, he joined Ross on her assignments.

“He drove me nuts,” she said in 2002. “He wanted to learn how to be a reporter. He didn’t know how to do it. He used this expression I hate — ‘I want to pick your brains.’”

Lillian Rosovsky was born in Syracuse, New York, most likely on June 8, 1918, according to public records. She grew up in Brooklyn but shrouded much of her early life in mystery. She was vague about her age, and some sources erroneously said she was as much as a decade younger.

Ross began writing for a school paper in junior high school and was editor of the student newspaper at New York’s Hunter College, from which she graduated in 1939.

During the early 1940s she worked at PM, a short-lived New York daily newspaper, and changed her last name to Ross. A friend recommended her to the New Yorker.

In the magazine’s heady midcentury milieu, Ross was drawn to Shawn, the meek, gnomic managing editor who became her mentor. They formed an immediate connection.

“From the first eye contact,” she later wrote, “I knew this was where I wanted to be.”

Shawn, who took over as the top editor after Harold Ross died in 1951, spoke in whispers and edited the New Yorker in a precise, persnickety style that came to define the magazine for decades.

In 1987, two years after S.I. Newhouse Jr. bought the New Yorker, the 79-year-old Shawn was dismissed. Many staff members considered his firing an act of betrayal, and Ross resigned in solidarity.

She was brought back to the magazine in 1992 — the year Shawn died — by editor Tina Brown, who encouraged Ross to write a memoir. Her book, “Here But Not Here” (1998), detailed her secret 40-year relationship with Shawn.

“Bill told me I was his ‘wife,’” Ross wrote. “I felt I was.”

Shawn, the father of three children, in effect led a double life. His wife, Cecille, was aware of his arrangement with Ross, who lived 11 blocks away.

“Almost every night, at some point,” Ross wrote, “Bill would leave his home, stand across the street from the fifth-floor apartment where I lived at the time, and stare up at my lighted window.”

Shawn installed a telephone in his bedroom, and only Ross had the number. She wrote of their dinners together, their visits to jazz clubs and their robust love life, which she said had “the earthiest and wildest kinds of sexual adventures.”

She considered Shawn the father of a son she adopted from Norway in 1966. Erik Ross, of New York, is her only survivor.

For many veterans of the New Yorker, who considered Shawn the embodiment of modesty, Ross’ memoir seemed indiscreet, vulgar and a violation of decorum — especially since Shawn’s widow was still living. They also said it fell short of Shawn’s editorial standards.

“Lillian Ross subtitles her book ‘A Love Story,’ and perhaps that is what she thinks she has written,” former New Yorker writer Jeremy Bernstein wrote in a caustic review for the Los Angeles Times. “It is something quite the opposite: a deeply hurtful, self-indulgent tasteless book that never should have been written at all and, having been written, never should have been published while the people involved were still alive.”

Earlier in her career, Ross published a collection of short fiction, “Vertical and Horizontal” (1963), satirizing the world of psychoanalysis. A year later, she directed a television documentary, “Dancers in May,” drawn from one of her New Yorker pieces about a group of fifth-graders preparing for a folk-dance festival.

Despite the fallout from her memoir, Ross remained a New Yorker fixture for years. In 2001, she edited an anthology of the magazine’s “Talk of the Town” articles, and her own work continued to be read and studied decades after it first appeared.

Ross often noted that she wrote her memorable profiles without relying on a tape recorder — yet the accuracy of her quotations was never challenged.

“To me, the machine distorts the truth,” she wrote in an introduction to her 2002 book, “Reporting Back.” “Tape-recorded interviews are not only misleading; they are unrealistic; they are lifeless. … Literal reality rarely rings true.”