A rare parchment engraving of the Declaration of Independence, ordered up by John Quincy Adams two centuries ago from printer William J. Stone and found in the attic of an ancestral Scottish house, sold for a near-record $4.4 million Thursday at Freeman’s auction house to an anonymous buyer.

Officials at Freeman’s, located on Market Street in Philadelphia, said it was the second-highest price ever paid at auction for any Declaration copy, eclipsed only by the $8.14 million paid in a 2000 New York City auction for a copy printed by John Dunlap in Philadelphia on the night of July 4-5, 1776.

Freeman’s said the price of the Stone Declaration on Thursday amounted to the highest ever fetched at auction by an American document printed in the 19th century, and it easily eclipsed the price paid at earlier sales of Stone Declarations.

The auction house had anticipated far less. Its pre-auction estimate for the document was$500,000 to $800,000.

Seth Kaller, an expert in early American documents, said that “great items find their market,” which was evident in the sale of the Stone Declaration.

“It had the greatest depth of bidders I’ve ever seen for a seven-figure document,” Kaller said, with a high number and wide range of participants, from individuals to institutions.

Concerned by excessive wear to the original Declaration, Adams commissioned Stone in 1820 to produce an exact rendering. The engraver labored for three years over his copper plate — eventually producing what is considered the most meticulous copy of the original document ever made. The 201 copies on parchment were distributed to the signers of the original Declaration, political leaders, and institutions. (Stone also kept one for himself.)

The copy sold by Freeman’s is one of 52 known survivors on parchment. It was one of two presented to signer Charles Carroll of Carrollton, Md., in 1824 (the other is in the collection of the Maryland Center for History and Culture), according to the auction house. It then passed to Carroll’s granddaughter and executor Emily Caton and her husband, John MacTavish, and subsequently descended in a Scottish family out of public view for 177 years, Freeman’s said.

“From its fairytale-like discovery through to today’s record-breaking auction, it has been both incredibly exciting and a true privilege to be involved with the sale of this significant piece of American history,” said Darren Winston, head of Freeman’s books and manuscripts department.

At the same time Freeman’s was auctioning off the Stone Declaration on parchment, the American Philosophical Society reported that it had discovered an even rarer version of the Stone engraving — on paper — in its own collection. It had been there since 1842, when Daniel Webster donated it.

For many years the APS Declaration was largely ignored, thought to be a “cheap Victorian” knockoff, said Anne Downey, APS head of conservation. But she was not convinced it was just a throwaway, and began taking a closer look. Late last month, APS announced that it held one of only eight known Stone Declarations printed on paper, not parchment.

While the APS Declaration is not currently on exhibit, the Freeman’s auction copy on parchment is now on temporary loan to the National Park Service and will be on display for the July Fourth holiday starting Sunday at the Second Bank on Chestnut Street.

The National Constitution Center also has a Declaration of Independence engraved on parchment by Stone, on loan from David Rubenstein, head of the Carlyle Group. In addition, the Historical Society of Pennsylvania has a number of rare Declarations, including a Stone engraving on parchment.