The valuable 17th-century letter was hiding in plain sight, available to almost anyone who checked the "D" drawer of the library card catalog at Haverford College.

"Descartes, Rene (1596-1650) French philosopher. 'Mon Reverend Pere' 27 May, 1641 (?) (in French)," reads the handwritten index card.

Yet this signed missive from Descartes, a pivotal figure in Western philosophy and mathematics, had remained unnoticed by scholars for more than a century until a Haverford librarian posted its existence online last fall.

The "discovery" of the famous, long-lost letter at first seemed an archivist's dream. But it briefly turned into a nightmare when college officials realized the document had illicit origins.

The happy ending comes next Tuesday when Haverford returns the letter to its rightful owner in Paris.

"We're not in the business of keeping stolen property," college president Stephen Emerson said.

The letter was one of thousands pilfered from French libraries in the 1800s by Guglielmo Libri, the director entrusted with their care. He was convicted in absentia of several thefts in France in 1850 but already had fled to England, selling the documents to collectors and booksellers.

Somehow, Descartes' four-page, tightly scripted correspondence ended up in a 12,000-piece collection donated to Haverford in 1902 by the widow of alumnus Charles Roberts. College officials believe Roberts, who collected autographs, had no idea of the letter's provenance.

Descartes ("I think, therefore I am") had written the dispatch to a priest friend to discuss his struggle with what would become his seminal book, Meditations on First Philosophy. It is now a basic text for college philosophy students.

Descartes was seeking advice on what to include, and what to leave out, to avoid excommunication from the Catholic Church, said Emerson, a 1974 philosophy major at Haverford.

But the letter remained inconspicuous at Haverford until John Anderies, head of special collections, posted an inventory of the Roberts trove online last fall.

A Descartes researcher at the University of Utrecht in the Netherlands found the listing and asked Anderies to e-mail him a scan of the letter.

"It's one of those precious finds," said the scholar, Erik-Jan Bos. "If they had not caught up with the spirit of digitizing the collections, then it could have been hidden there for another many years."

Then Bos broke the news of the letter's history. Further investigation - including an ultraviolet light that appeared to reveal where Libri scraped off a property stamp - seemed to confirm Bos' theory, said Anderies, who is still floored by the whole story.

Emerson, the college president, immediately knew he wanted to return the letter to the Institut de France.

The institute's chancellor, Gabriel de Broglie, was so thrilled he offered Haverford a reward of 15,000 euros ($19,000).

Emerson will accept the gift at a handover ceremony in Paris.

The money will be used to support students studying French language and culture, he said.