There is some compensation for the enthralled reader sailing reluctantly into the final pages of "The Lacuna," Barbara Kingsolver's first novel in nine years -- and her best. That's because the story's conclusion is a bittersweet surprise that'll make you slam this thick, flavorful book down and say, "That was fine! A great ending, too!"

In this sprawling story, Kingsolver does what she does best -- craft characters whose fates are shaped by culture and era -- better than she's done before, that is, with more artful shading and less of the high-minded moralizing that can give some parts of her work a sermonlike cast.

"The Lacuna" is the story of Harrison Shepherd, a half-Mexican, half-American writer whose exceptionally good heart subjects him both to tremendous joy and excruciating sorrow. We meet him as a boy in 1929 in Mexico, where he has been dragged by his mother, the mistress of a wealthy man. Dreamy and oft-neglected, he becomes enamored of diving in the ocean, under whose blue sheen lies a wondrous world of radiant fish and a rock tunnel he calls the lacuna, through which a strong-lunged swimmer can wriggle to a secret pond set in ancient ruins.

The lacuna, the hazardous passage between two worlds, becomes an abiding metaphor as he passes into a complicated young manhood. Through a pleasingly believable turn of events, he becomes cook to artists Diego Rivera and Frida Kahlo and their guest Leon Trotsky, to whose murder by a Stalinist agent Harrison is a horrified witness.

Kingsolver does an admirable job of turning Rivera, Kahlo and Trotsky into fictional characters you can believe in, thus bypassing the downfall of many historical novels, the creation of wooden "real" people.

After Trotsky's murder, Kahlo helps Harrison find passage to the United States, where he embraces the can-do spirit of Americans during World War II. He settles in Asheville, N.C., where he meets an educated misfit of a mountain woman who becomes his secretary.

In the final third of the book, Harrison's literary and personal reputations are befouled by rumors that he is a Communist, an accusation stemming from his association with Trotsky. His novels, all of which are set in ancient Mexico and show the folly of prideful and brutal kings, are condemned as criticisms of U.S. powerholders, a criticism that ironically lends truth to the objection it raises.

Kingsolver shows how the McCarthy era was a toxic time in history without saying as much, simply by showing how those who embraced the hysteria, from the press to longtime neighbors, ruin the life of one man by twisting his words and misinterpreting his dreams. The parallels to modern America, where untruths, nonsense and trivia often serve as our culture's bread and butter, are painfully obvious.

Kingsolver is such a virtuoso that not only do we forgive imperfections in her writing -- excessively long passages of snappy dialogue, for instance -- we become fond of them. Her knowledge of science and the natural world enhances her gifts as a writer, and gorgeous passages gild every page.

Kingsolver is one of this country's and this era's best writers. A dive into "The Lacuna" is a journey both profound and pleasurable.

Pamela Miller is a Star Tribune night metro editor.