WASHINGTON — A secret history of the United States government’s Nazi-hunting operation concludes that American intelligence officials created a “safe haven” in the United States for Nazis and their collaborators after World War II, and it details decades of clashes, often hidden, with other nations over war criminals here and abroad.

The 600-page report, which the Justice Department has tried to keep secret for four years, provides new evidence about more than two dozen of the most notorious Nazi cases of the last three decades.

It describes the government’s posthumous pursuit of Dr. Josef Mengele, the so-called Angel of Death at Auschwitz, part of whose scalp was kept in a Justice Department official’s drawer; the vigilante killing of a former Waffen SS soldier in New Jersey; and the government’s mistaken identification of the Treblinka concentration camp guard known as Ivan the Terrible.

The Justice Department report, describing what it calls “the government’s collaboration with persecutors,” says that O.S.I investigators learned that some of the Nazis “were indeed knowingly granted entry” to the United States, even though government officials were aware of their pasts. “America, which prided itself on being a safe haven for the persecuted, became — in some small measure — a safe haven for persecutors as well,” it said.

The report also documents divisions within the government over the effort and the legal pitfalls in relying on testimony from Holocaust survivors that was decades old. The report also concluded that the number of Nazis who made it into the United States was almost certainly much smaller than 10,000, the figure widely cited by government officials.

The Justice Department has resisted making the report public since 2006. Under the threat of a lawsuit, it turned over a heavily redacted version last month to a private research group, the National Security Archive, but even then many of the most legally and diplomatically sensitive portions were omitted. A complete version was obtained by The New York Times.

The Justice Department said the report, the product of six years of work, was never formally completed and did not represent its official findings. It cited “numerous factual errors and omissions,” but declined to say what they were.

More than 300 Nazi persecutors have been deported, stripped of citizenship or blocked from entering the United States since the creation of the O.S.I., which was merged with another unit this year.

In chronicling the cases of Nazis who were aided by American intelligence officials, the report cites help that C.I.A. officials provided in 1954 to Otto Von Bolschwing, an associate of Adolf Eichmann who had helped develop the initial plans “to purge Germany of the Jews” and who later worked for the C.I.A. in the United States. In a chain of memos, C.I.A. officials debated what to do if Von Bolschwing were confronted about his past — whether to deny any Nazi affiliation or “explain it away on the basis of extenuating circumstances,” the report said.

The Justice Department, after learning of Von Bolschwing’s Nazi ties, sought to deport him in 1981. He died that year at age 72.

The report also examines the case of Arthur L. Rudolph, a Nazi scientist who ran the Mittelwerk munitions factory. He was brought to the United States in 1945 for his rocket-making expertise under Operation Paperclip, an American program that recruited scientists who had worked in Nazi Germany. (Rudolph has been honored by NASA and is credited as the father of the Saturn V rocket.)

The report cites a 1949 memo from the Justice Department’s No. 2 official urging immigration officers to let Rudolph back in the country after a stay in Mexico, saying that a failure to do so “would be to the detriment of the national interest.”

Justice Department investigators later found evidence that Rudolph was much more actively involved in exploiting slave laborers at Mittelwerk than he or American intelligence officials had acknowledged, the report says.

Some intelligence officials objected when the Justice Department sought to deport him in 1983, but the O.S.I. considered the deportation of someone of Rudolph’s prominence as an affirmation of “the depth of the government’s commitment to the Nazi prosecution program,” according to internal memos.

The Justice Department itself sometimes concealed what American officials knew about Nazis in this country, the report found.

After World War II, American counterintelligence recruited former Gestapo officers, SS veterans and Nazi collaborators to an even greater extent than had been previously disclosed and helped many of them avoid prosecution or looked the other way when they escaped, according to thousands of newly declassified documents.

Reuters

The Nazi officer Klaus Barbie escaped to Bolivia; he and others got American help.

With the Soviet Union muscling in on Eastern Europe, “settling scores with Germans or German collaborators seemed less pressing; in some cases, it even appeared counterproductive,” said a government report published Friday by the National Archives.

“When the Klaus Barbie story broke, about his escaping with American help to Bolivia, we thought there weren’t any more stories like that, that Barbie was an exception,” said Norman J. W. Goda, a University of Florida professor and co-author of the report with Professor Richard Breitman of American University. “What we found in the record is that there were a fair number, and that it seems more systematic.”

In chilling detail, the report also elaborates on the close working relationship between Nazi leaders and the grand mufti of Jerusalem, Haj Amin al-Husseini, who later claimed that he sought refuge in wartime Germany only to avoid arrest by the British.

In fact, the report says, the Muslim leader was paid “an absolute fortune” of 50,000 marks a month (when a German field marshal was making 25,000 marks a year). It also said he energetically recruited Muslims for the SS, the Nazi Party’s elite military command, and was promised that he would be installed as the leader of Palestine after German troops drove out the British and exterminated more than 350,000 Jews there.

On Nov. 28, 1941, the authors say, Hitler told Mr. Husseini that the Afrika Corps and German troops deployed from the Caucasus region would liberate Arabs in the Middle East and that “Germany’s only objective there would be the destruction of the Jews.”

The report details how Mr. Husseini himself was allowed to flee after the war to Syria — he was in the custody of the French, who did not want to alienate Middle East regimes — and how high-ranking Nazis escaped from Germany to become advisers to anti-Israeli Arab leaders and “were able to carry on and transmit to others Nazi racial-ideological anti-Semitism.”

“You have an actual contract between officials of the Nazi Foreign Ministry with Arab leaders, including Husseini, extending after the war because they saw a cause they believed in,” Dr. Breitman said. “And after the war, you have real Nazi war criminals — Wilhelm Beisner, Franz Rademacher and Alois Brunner — who were quite influential in Arab countries.”

In October 1945, the report says, the British head of Palestine’s Criminal Investigation Division told the assistant American military attaché in Cairo that the mufti might be the only force able to unite the Palestine Arabs and “cool off the Zionists. Of course, we can’t do it, but it might not be such a damn bad idea at that.”

“We have more detailed scholarly accounts today of Husseini’s wartime activities, but Husseini’s C.I.A. file indicates that wartime Allied intelligence organizations gathered a healthy portion of this incriminating evidence,” the report says. “This evidence is significant in light of Husseini’s lenient postwar treatment.” He died in Beirut in 1974.

The report, “Hitler’s Shadow: Nazi War Criminals, U.S. Intelligence and the Cold War,” grew out of an interagency group created by Congress to identify, declassify and release federal records on Nazi war crimes and on Allied efforts to hold war criminals accountable. It is drawn from a sampling of 1,100 C.I.A files and 1.2 million Army counterintelligence files that were not declassified until after the group issued its final report in 2007.

“Hitler’s Shadow” adds a further dimension to a separate Justice Department history of American Nazi-hunting operations, which the government has refused to release since 2006 and which concluded that American intelligence officials created a “safe haven” in the United States for certain other former Nazis.

Like earlier reports generated by the group, this one paints a grim portrait of bureaucracy, turf wars and communication gaps among intelligence agencies. It also details blatantly cynical self-interested tactical decisions by Allied governments and a general predisposition that some war crimes by former Nazis and their collaborators should be overlooked because the suspects could be transformed into valuable assets in the more urgent undercover campaigns against Soviet aggression.

The American intelligence effort to infiltrate the East German Communist Party was dubbed “Project Happiness.”

“Tracking and punishing war criminals were not high among the Army’s priorities in late 1946,” the report says. Instead, it concludes that the Army’s Counterintelligence Corps spied on suspect groups ranging from German Communists to politically active Jewish refugees in camps for displaced people and also “went to some lengths to protect certain persons from justice.”

Among them was Rudolf Mildner, who was “responsible for the execution of hundreds, if not thousands, of suspected Polish resisters” and as a German police commander was in Denmark when Hitler ordered the country’s 8,000 Jews deported to Auschwitz.

Mr. Mildner escaped from an internment camp in 1946, and the report raises questions about whether American intelligence agents’ “lenient treatment of Mildner contributed in some way to his ability to escape” and even suggests that he may have remained in American custody helping identify Communists and other subversives before settling in Argentina in 1949.

The report cites other cases that parallel the experience of Klaus Barbie, known as the Butcher of Lyon. He cooperated with American intelligence agents who helped him flee to Argentina.

One of those cases involved Anton Mahler, who as a Gestapo anti-communist agent interrogated Hans Scholl, the German underground student leader who was beheaded in 1943. Mr. Mahler also served in Einsatzgruppe B in occupied Belarus, which was blamed for the execution of more than 45,000 people, mostly Jews.

“This admission on his own U.S. military government questionnaire in 1947 was ignored or overlooked by U.S. and West German authorities,” the report said.

American agents recommended that Mr. Mahler and other former Nazis be protected from politically inspired criminal proceedings in Germany.

In 1952, the report says, the C.I.A. moved to protect Mykola Lebed, a Ukrainian nationalist leader, from a criminal investigation by the Immigration and Naturalization Service. He would work for American intelligence in Europe and the United States through the 1980s, despite being implicated in guerrilla units during the war that killed Jews and Poles and being described by an Army counterintelligence report as a “well-known sadist and collaborator of the Germans.”