The savvy owner of Neil Armstrong's moon dust bag has made a profit of $1.8 million on the canvas pouch.

The bag, which was used by Armstrong to collect samples during the Apollo 11 mission in 1969, sold for just over $1.8 million at an auction in New York on Thursday.

That was less than the $2 million to $4 million auctioneer Sotheby's thought it would fetch, but still 1,821 times the price ($995) collector Nancy Carlson paid for it just two years ago.

The original purpose of the bag was only discovered when Carlson bought it in an online auction of assets seized by the U.S. Marshals Service.

Carlson then sent it to NASA, which identified the bag as the one used by Armstrong. It also confirmed that the bag still contained lunar dust.

A legal battle then followed. According to the U.S. District Court in Kansas, NASA wanted to keep hold of the bag, arguing that the artifact was unique and should never have been sold to a private collector.

The bag ended up in the hands of the U.S. Marshals Service as part of property seized from a space museum president, who was convicted of fraud and stealing from the museum.

It was found in his garage but misidentified. According to the Kansas court documents, the U.S. government said that "no one, including the United States, realized that this bag was used on Apollo 11 and was an historically important item."

The court ruled that Carlson bought the bag lawfully, and ordered NASA to return it to her.

Related: A handbag just sold for $377,000

Armstrong collected roughly 500 grams of dust and 12 rock fragments as he walked through an area of the moon known as The Sea of Tranquility.