The latter view is widely held by those who have been outed as agents but insist they had never knowingly worked for the K.G.B. Instead, they say, they have been framed by Soviet secret police officers who padded their roster of informants, either to impress superiors or plant a slowly ticking time bomb under Latvia’s future as an independent state.

“It is impossible that the K.G.B. would leave behind a real list of agents in what it considered enemy territory,” Mr. Tjarve said. The files, he said, must have been doctored and deliberately left as a “special gift” to Latvia, now a member of NATO, as part of a “disinformation operation” by retreating Soviet officers.

Latvians found “in the bags,” the term of art for people who have turned up in the files, include a two-time former prime minister, the chief justice of the Supreme Court, a onetime foreign minister, leaders of the Catholic and Orthodox churches, three post-independence rectors of the University of Latvia, celebrated filmmakers and assorted television stars and writers. Some names leaked years ago or appeared in a Latvian documentary, “Lustrum,” released late last year.

But the publication of the full list has still caused dismay.

Mara Sprudja, director of the national archive, which began posting the files online in December and will release another batch in May, said she was particularly shocked, for example, to see the name of Andres Slapins, a Latvian cameraman, shot and killed by Soviet troops who attacked pro-independence activists in Riga, the capital, in 1991.