Ian Caldwell and Dustin Thomason grew up in Northern Virginia believing that books can change lives. With that in mind, they wrote a novel, "The Rule of Four," a mystery in which lives revolve around -- and are lost because of -- an ancient book. The novel is a smash. This weekend it moves to No. 5 on The Washington Post's fiction list. And yesterday it was the top seller at Amazon.com.

Turns out, the lifelong friends are onto something. Books can change lives. Theirs will be forever altered by the success of their first novel.

They got a taste of the new life Wednesday when they came home for a reading at Borders Books & Music at Baileys Crossroads. As the store filled with more than 200 people -- many old friends and teachers and family members -- the co-authors drank ice water in the cafe and talked about their long, strange trip to overnight literary stardom.

To keep them straight: Caldwell -- taller, glasses, light shirt -- grew up in Annandale, went to Princeton, lives in Newport News and has a fiancee. Thomason -- smaller, glasses-less, dark shirt -- grew up in Falls Church, went to Harvard, lives in New York and has a girlfriend.

They are both 28 years old, bright, soft-spoken, mannerly, complimentary of each other and somewhat shell-shocked by fame.

They met at Belvedere Elementary School in Falls Church circa 1984 and discovered they had a lot in common. They lived across Columbia Pike from each other. Caldwell was not allowed to cross the street by himself; Thomason was. They played together in Caldwell's room, which was in the basement. "We became fast friends," Caldwell said.

They played soccer on the same team, coached by Caldwell's father, Ray, and they co-wrote a play, "The Klutzy Kidnappers," in Marie Baglio's third-grade class. They went on to be classmates at Glasgow Intermediate School and Thomas Jefferson High School for Science and Technology. Through the years they co-wrote other things, including song parodies and a speech Thomason delivered at their high school graduation.

"It was terrible," Caldwell said.

"We're interested in similar things in different ways," he said.

Thomason added, "We were never competitive."

They stayed in touch while in college. In the middle of their senior years they decided to write a novel together. "We didn't know what we were doing," Caldwell said.

The summer after graduation, they set up computers, side by side, in Caldwell's basement and began writing "The Rule of Four."

In the novel, a quartet of friends at Princeton sets out to break the code of the "Hypnerotomachia Poliphili" (pronounced Hip-ner-AH-toe-MAHK-ee-a Poh-LIH-fill-lee), a wide-ranging and esoteric tome about love, architecture and a whole bunch of weird stuff, written in seven languages and published in 1499. They hope to discover an ancient treasure. Along the way there is murder and surprise.

Thomason and Caldwell thought they could finish the novel in three months. When fall rolled around, Caldwell took a job at McLean-based MicroStrategy, and Thomason went to medical school in New York. They also kept working on their book.

They would talk on the phone, long into the night, about what needed to be written next. They divided the labor. Each would write a draft based on the ideas. They exchanged revisions and critiques. "We definitely disagreed on things," Thomason said.

After working on it for more than two years, they found an agent who sent the manuscript out to publishers.

Nobody bit.

But one editor, Susan Kamil at Dial Press, met with the co-authors and made some suggestions. "We spent about a year addressing those concerns," Thomason said. "By the time we finished, our agent had retired."

They found another, Jennifer Joel, a classmate of Thomason's, who sent the book out to publishers once again. Dial bought the book in 2002 at auction for a reported $500,000.

Published this month, "The Rule of Four" is not as ambitious as "The Da Vinci Code" by Dan Brown, or as textured as "The Name of the Rose" by Umberto Eco, but it has been compared to both.

The reviewer at Publishers Weekly wrote that it is more cerebral and better written than Brown's bestseller. But there's no doubt that Caldwell and Thomason are riding on Brown's codetails.

The reviewer for Booklist wrote that the authors "have made an impressive debut, a coming-of-age novel in the guise of a thriller, packed with history (real and invented) and intellectual excitement. But despite their command of language and arcana, the book occasionally betrays its origins as a post-college project."

It's a smart, safe book for booksellers to recommend to people who liked "The Da Vinci Code."

"The combination of history and mystery is very popular right now," said Lisa Greig, a marketing manager for Borders.

Another inspiration, the co-authors said, was "The Secret History" by Donna Tartt, also a mystery set on a privileged campus.

Caldwell and Thomason have been inspired by books their whole lives. "My parents were both avid readers," Caldwell said. "My earliest memories are of my mother reading aloud to me."

Thomason said his grandfather Robert Thomason, a longtime college counselor and English teacher at Sidwell Friends, was instrumental in his love of learning. "I used to go to his house," Thomason said, "and talk about books I had read."

The co-authors each read aloud from "The Rule of Four" at Borders. After Caldwell finished, he turned the microphone over to Thomason -- whom he called Dusty. Thomason read a scene about college life. Here's an excerpt: "Gil glances over at us and smiles. He's been pretending to study for an economics exam, but Breakfast at Tiffany's is on, and Gil has a thing for old films, especially ones with Audrey Hepburn. His advice to Charlie is simple: if you don't want to read the book, then rent the movie."

Then they took a few questions.

Someone asked if they were working on something new. They said yes and that it will be set in the present, but will hinge on a mystery of the past. Something, they said, that will be easier to pronounce than "Hypnerotomachia."

Thomason said he took a writing course from Jamaica Kincaid at Harvard. Caldwell said he learned to write by trial and error, and by buying every "How to Write" manual from the very Borders he was speaking in.

"I don't know what it would be like to write alone," Thomason said.

Their advice: Never give up.

Afterward, they sat side by side -- as they did when first writing the novel -- and signed copies.

Nearby, Thomason's parents greeted friends and relatives. Robert Thomason, Dustin's grandfather, smiled. In a seersucker jacket and tortoise-shell glasses, the white-haired man recalled reading drafts of the novel. "When an editor suggested a love interest," he said, "I said, 'Go for it!' "

Initially Thomason, 76, was concerned that the book would be too esoteric for most people because it is filled with literary arcana. But, he said, laughing, "I suppose that many just skip over it and look for the blood and what little sex is in it."

A couple of Thomason family friends, Stanley Horowitz and his wife, Carole Kitti, stopped to get some books signed and to snap a photograph.

Cameron Brent, 28, who works in marketing in Arlington, said she has known the co-authors since elementary school.

"They're very clever," she said. "They are witty young men. Always have been."

Ian Caldwell, left, and Dustin Thomason sign copies of their mystery "The Rule of Four."