Locke Lamora is a thief, a liar and a terrible swordsman. Fortunately, he is very good at the first two. As leader of the Gentlemen Bastards, Locke runs elaborate confidence games against Camorr’s nobility while pretending that his gang consists of harmless, second-rate pickpockets. Their secrecy protects them from Capa Barsavi, the crime lord who permits theft in the city but forbids anyone from targeting the aristocracy.

The novel begins as an energetic fantasy heist. Locke and his companions are attempting to separate Don and Doña Salvara from half their fortune using false identities, counterfeit brandy and an invented civil war. Then a criminal calling himself the Gray King begins murdering Barsavi’s most powerful followers. The two plots collide, and the clever thieves discover that they have wandered into a game controlled by someone with fewer scruples and far more dangerous resources.

Camorr is the book’s first great achievement. It is a filthy, beautiful canal city built inside the indestructible glass architecture of a vanished civilization. Alchemical gardens, gladiatorial shark fights, floating fortresses and towers of Elderglass make it feel fantastical without overwhelming the story. Lynch explains a great deal, sometimes at considerable length, but most of those apparent digressions eventually become part of a disguise, escape or betrayal.

The Gentlemen Bastards themselves are the stronger achievement. Locke may be the mastermind, but Jean Tannen is the novel’s heart. Calo and Galdo supply the irreverence, Bug supplies enthusiasm and Father Chains supplies the principles—flexible though they are—that turn a group of abandoned children into a family. Their vulgar, affectionate conversations do more to establish their loyalty than any heroic speech could.

The structure alternates the present-day disaster with interludes from Locke’s childhood. At first I treated the flashbacks as interruptions, but they reveal exactly the skill or relationship the current plot is about to test. They also make the novel’s sharp turn into tragedy hurt much more. This is a funny book until it suddenly is not, and Lynch never treats the consequences as temporary obstacles before the next joke.

There are weaknesses. The descriptions occasionally become so enthusiastic that they slow an otherwise urgent plot, while the magical rules surrounding the Bondsmage sometimes feel designed for maximum narrative convenience. The largely male cast is also noticeable. Sabetha, supposedly one of the most important people in Locke’s life, never appears in the present story and exists mainly as an absence.

Those problems are easy to forgive because the book understands what makes a satisfying con: preparation, misdirection and a reveal that changes the meaning of what came before. The Lies of Locke Lamora is inventive, viciously funny and far more emotionally destructive than its caper premise suggests. It works as the beginning of a series, but it also delivers a complete story about pride, revenge and the price of underestimating the wrong person.