The patent documents for the Wright brothers’ flying machine, which were lost for 36 years and recently discovered. (Bill O'Leary/The Washington Post)

The beat-up manila envelope sat on a table in the National Archives office in Kansas City, Mo. It had just been fetched from a limestone cave outside of town, and conservator Lauren Varga had been sent with a security escort from Maryland to bring it home.

First, she had to check the contents. She opened the envelope and examined one of the folders inside. There, on the cover, was the famous patent No. 821,393. There were the famous names Orville Wright and Wilbur Wright.

And next to the word invention, the cover form read: “Flying Machine.”

It was, indeed, the century-old patent file for the Wright brothers’ pioneering airplane — a file that contained one of history’s greatest patent applications. And until last month, it had been missing for 36 years.

A sleuthing archivist found the file March 22 in a special records storage cave in Lenexa, Kan., where it was sent at some point after it vanished around 1980.

Jay Bosanko of the National Archives, right, and Mitch Yockelson, an investigative archivist, look over the patent documents for the Wright brothers flying machine, lost for 36 years and recently discovered. (Bill O'Leary/The Washington Post)

It should have been stored in a “treasure” vault with other priceless documents in the Archives building in Washington, National Archives and Records Administration Chief Operating Officer William J. Bosanko said last week.

But when officials preparing for a commemoration looked for it there in 2000, it was gone, he said.

Experts had been searching for it ever since.

Then two weeks ago, Kansas archivist Bob Beebe emailed a colleague at the Archives complex in College Park: “We found it.”

Varga, a senior conservator, brought it back Tuesday, and gave it a check up in the Maryland conservation lab Wednesday. It was in decent shape.

But how did such a treasured record wind up in a storage cave 1,000 miles from Washington?

Most likely through a simple filing mistake decades ago, Bosanko said. “Unfortunately, with billions of pieces of paper, things sometimes go where they shouldn’t be,” he said.

A photograph that was included with the patent application. (Bill O'Leary/The Washington Post)

Parts of the file are scheduled to be exhibited in the National Archives Museum’s West Rotunda Gallery in Washington starting May 20.

The find came as the agency beefs up its Archival Recovery Program, which hunts for missing documents and artifacts, said investigative archivist Mitchell Yockelson.

Two extra archivists were detailed to what is essentially a “cold case squad” in February, he said.

There was the possibility the Wright patent file had been stolen, as other documents have been, such as telegrams from Abraham Lincoln, Yockelson said in an interview Wednesday at the College Park facility.

“But . . . we felt, I guess, all along . . . that it was probably misfiled,” he said. “And figuring out where is that misfile,” among the millions of patent papers, was the challenge.

Bosanko said: “If somebody puts something back in the wrong place, it’s essentially lost. In this case, we didn’t know. We had to ask ourselves, ‘Is it something that could have been stolen?’ ”

The Archives has numerous missing documents — from letters of Civil War generals and telegrams from Lincoln, to World War II bombing maps. The Wright brothers’ patent file is among the most prominent.

The Wrights, tinkerers and bicycle mechanics, had applied for a patent for their airplane on March 23, 1903, less than a month after they started building it. The craft was made mostly out of fabric and wood.

It was nine months before they got their “flyer” into the air on Dec. 17, 1903, at windblown Kill Devil Hills, on the Outer Banks of North Carolina. The flight lasted 12 seconds and covered 120 feet.

It was the world’s first heavier-than-air, powered, controlled flight, according to the National Park Service, which maintains a historic site there.

By the time the patent was granted in 1906, the file was filled with letters, affidavits, fee receipts, drawings, photos and examiner’s notes, among other things.

One document begins:

“Be it known that we Orville Wright and Wilbur Wright, both citizens of the United States, residing in the city of Dayton and state of Ohio, have jointly invented a new and useful machine for navigating the air.”

History would prove it most useful.

Archivist Chris Abraham had been working for the recovery program for about three weeks and had volunteered to hunt for the Wright patent file.

“I had an interest in the Wright brothers,” he said in an interview. “This has been on our list for quite some time.”

The file had once been stored in the National Archives building in Washington, but in 1969, it was transferred to a federal records center in Suitland, Md.

In 1979, parts for the file were lent to the Smithsonian for an exhibit and then returned to Suitland.

“We had a pull slip from our files saying that the document was returned to the National Archives in 1980,” Abraham said. “But . . . that’s where the trail goes cold.”

Abraham knew the Wrights had other patents, which weren’t in the treasure vault.

He thought that they were with the Archives’ vast patent records stored in the Lenexa cave. He asked Beebe to check for Wright patents there to see if the missing file might be among them.

The cave records center opened in 2003, and the Archives patent files were sent some years later, Beebe said. “We have pretty much everything, except for certain files that are deemed very historical.”

He said he memorized the missing Wright patent’s number and, guided by Abraham, began checking box after box of records in the 15-foot-high underground stacks.

He struck out.

“At that point, I’m like, ‘Man, I’m not going to find it,’ ” he said by phone Thursday.

But he was asked to check one more box, which he did around 7:30 a.m. March 22. He said he lifted the lid, and there, stuffed among the neat patent folders, was a fat manila envelope.

The upper left-hand corner bore the logo “the White House.” And in the center someone had written “Wright Brothers’ Patents.” As he removed one of the folders inside, he spotted a partially obscured number that ended in 393.

“This is what we’re looking for,” he said he thought at the time.

With shaking hands, he emailed Abraham, who contacted Yockelson.

“I was stunned,” Yockelson said. “If I had to pick one [crucial] document . . . that’s missing, this was it . . . It’s the holy grail.”

He said he thinks the file hasn’t been seen by archivists or historians since 1980.

Abraham said he did not know why no one had thought to check the other Wright patent files before. “It was just one of those things,” he said.

As for “the White House” logo, Bosanko said some frugal archivist probably used a recycled envelope.

“This wasn’t hidden in the White House or anything all these years,” he said.