The government decision came just a day before his work was about to be sold off at an auction in Paris, and means that the document, Sade’s earliest work of fiction, may not be taken out of the country for at least 30 months. During that time, the state is expected to shore up funds to purchase it at international rates, according to officials involved in the sale and the government decision.

Officials also designated André Breton’s “Surrealist Manifesto” as a national treasure.

Sade’s work, written on a scroll measuring 39 feet long and just four inches wide, “is a serious document of literature, of France’s literary history,” said Frédéric Castaing, an expert on 18th-century manuscripts and a member of a commission that advises the government on what works should be designated as national treasures.

“Without a doubt, it is a writing that challenges, that reaches into the depths of humanity, of the obscure,” Mr. Castaing said. Sade, he added, was one of France’s most influential authors of the 18th century, alongside Voltaire and Diderot, and inspired the Surrealist movement in the 20th century.

The Ministry of Culture said that the manuscript was “remarkable,” given the prison conditions in which it was written and its extraordinary journey through different hands. The ministry also pointed to the work’s “sulfurous reputation” and its influence on a number of 20th-century French authors.

Image A portrait of Sade by Charles Amédée Philippe van Loo.

The writing, it said, “is of great significance, as much as it is his first work as it is his most radical and most monumental.”