Quicksand, a remarkable new novel from Sweden, takes us into the life of Maja Norburg, who is 18, blessed with beauty, brains, and rich parents - and on trial for mass murder.

The novel, arriving here after success in Europe, in some ways recalls The Girl with the Dragon Tattoo, but because Maja narrates her own story, we come to know her more intimately than we do Lisbeth Salander. What we don't know is whether the story will end with Maja going to prison.

The book opens with Maja in court, charged with carrying out several murders with her lover, Sebastian Fagerman, the handsome and charismatic but unstable son of the richest man in Sweden. They are said to have killed Sebastian's father in his home and then moved on to their school to kill a teacher and several of their classmates. The outburst of violence ends with Maja fatally shooting Sebastian - possibly in self-defense - and left to face justice alone. Her high-priced lawyer expresses optimism the reader may find hard to share.

The story alternates between courtroom scenes and Maja's richly detailed memories. She recalls losing her virginity at 15 to a boy who smoked hash, played bass, and wrote poetry. But her great love is Sebastian, who gives the wildest parties, uses the coolest drugs, and jets off to New York and Paris for weekends. The author, Malin Persson Giolito, carries us deep into the lives of these star-crossed lovers and the decadent society that shaped them.

Once Sebastian is gone, Maja is left loving no one except her 5-year-old sister, whom she hasn't seen since she was sent to jail to await trial. Except for missing her, Maja doesn't mind jail, because it's quiet and private and she's safe from all the people headlines have taught to hate her.

Giolito, who practiced law before she turned to fiction, writes with exceptional skill. Her story examines the corrosive effects of vast wealth. Even the novel's title, Quicksand, suggests a world that will suck in, swallow, and devour the unwary.

Giolito always shows sympathy for Maja, who is variously brave, confused, self-destructive, and beset by problems she doesn't understand. It's a long novel, perhaps a little too long, but always smart and engrossing. We race along to learn whether Maja's lawyer can save her. Or whether, in fact, prison may be where she belongs. Giolito keeps us guessing, and the outcome, when it arrives, is just as it should be.

Patrick Anderson regularly reviews mysteries and thrillers for the Washington Post.