MOSCOW — A Russian court refused on Monday to order Russia’s top security agency to release documents that would shed light on the mysterious death of Raoul Wallenberg, a Swedish diplomat and Holocaust hero.

Following a brisk one-day hearing, a judge in Moscow agreed with Federal Security Service’s lawyers, who argued that the agency cannot make the documents public, as they would reveal private information about other prisoners of the Soviet secret service, as well as its guards and investigators.

Marie Dupuy, Mr. Wallenberg’s niece, filed a lawsuit against the security service, known as the F.S.B., in July, seeking access to uncensored prison records and other documents that could give clues about his fate. In a surprising decision, a Moscow court agreed to hear the case.

In 1944, Mr. Wallenberg, an offspring of a rich, influential family, was Sweden’s special envoy in Budapest, where he used his diplomatic status to issue so-called “protective passports” to tens of thousands of Jews, thus saving them from the almost certain death in Nazi gas chambers.