The trilogy should stand on its own, she said. “I think about the readers. They got to know a fantastic writer who becomes like an old friend. And now they say, ‘Your old friend is gone but we’ll give you a blind date, and be happy.’ ”

Ms. Gabrielsson wrote a book about the struggle over Mr. Larsson’s legacy several years ago, and the Larsson heirs have responded with offers of work and money that she has rejected.

At 52, Mr. Lagercrantz is two years older than Mr. Larsson was when he died. He said he embraced the challenge of creating the sequel when it was proposed by his agent, who once worked at Norstedts, the Swedish publisher of the trilogy. “I’m a strange kind of author — I like assignments,” Mr. Lagercrantz said. “I wasn’t clever enough to invent an iconic figure like Salander, but she’s my kind of girl.”

Mr. Larsson described the inspiration for Lisbeth Salander, the tough, tattooed computer genius who became his most memorable character, as “Pippi Longstocking” grown up, a woman who lives by her own rules. But Mr. Lagercrantz discovered that Stieg and his younger brother, Joakim, now 57, were great readers of comics as children, including “Modesty Blaise,” a British strip featuring a femme fatale supervillain turned superheroine.

“First we seek our heroes in old myths, and now we seek them in popular culture,” Mr. Lagercrantz said. “They told me you have to be at home in Stieg Larsson’s world, but it has to be your book. And after a while, I couldn’t have Stieg Larsson’s ghost hanging over me.”

So he delved more deeply into Lisbeth’s childhood and enhanced the character of Lisbeth’s twin, Camilla, who is mentioned only a few times in the previous three books.