From the mid-1950s to the early 1970s, police surveillance of political organizations in New York was extensive enough to require more than half a million index cards, simply to catalog and cross-reference the many dossiers. But over the ensuing decades, the dossiers themselves were presumed missing or lost. Police Department lawyers said they had no idea where the files had gone.

Now, a significant portion of the missing files have been discovered during what the city said on Thursday was a routine inventory of a Queens warehouse, where archivists found 520 brown boxes of decades-old files, believed to be the largest trove of New York Police Department surveillance records from the era.

“It’s the whole mother lode,” said Gideon Oliver, a civil rights lawyer who two years ago filed a lawsuit on behalf of a historian seeking records about a group that was a target of surveillance.

The boxes, according to a written index, contain extensive files about the Black Panthers, the Nation of Islam and the Young Lords, as well as public demonstrations and civil unrest. Files on individuals are also among the documents; at least 15 boxes primarily contain photographs, Mr. Oliver said.