Dozens of suspected Nazi war criminals and SS guards collected millions of dollars in U.S. Social Security benefits after being forced out of the United States, an Associated Press investigation has found.

The payments, underwritten by American taxpayers, flowed through a legal loophole that gave the U.S. Justice Department leverage to persuade Nazi suspects to leave the U.S. If they agreed to go, or simply fled before deportation, they could keep their Social Security, according to interviews and internal U.S. government records.

Among those receiving benefits were armed SS troops who guarded the network of Nazi concentration and death camps; a rocket scientist who used slave laborers to advance his research in the Third Reich; and a Nazi collaborator who engineered the arrest and execution of thousands of Jews in Poland.

There are at least four living beneficiaries. They include Martin Hartmann, a former SS guard at the Sachsenhausen camp in Germany, and Jakob Denzinger, who patrolled the grounds at the Auschwitz camp complex in Poland.

Hartmann moved to Berlin in 2007 from Arizona just before being stripped of his U.S. citizenship. Denzinger fled to Germany from Ohio in 1989 after learning denaturalization proceedings against him were underway. He soon resettled in Croatia and now lives in a spacious apartment on the right bank of the Drava River in Osijek. Denzinger would not discuss his situation when questioned by an AP reporter; Denzinger's son, who lives in the U.S., confirmed his father receives Social Security payments and said he deserved them.

The deals allowed the Justice Department's former Nazi-hunting unit, the Office of Special Investigations, to skirt lengthy deportation hearings and increased the number of Nazis it expelled from the U.S.

But internal U.S. government records obtained by the AP reveal heated objections from the State Department to OSI's practices. Social Security benefits became tools, U.S. diplomatic officials said, to secure agreements in which Nazi suspects would accept the loss of citizenship and voluntarily leave the United States.

"It's absolutely outrageous that Nazi war criminals are continuing to receive Social Security benefits when they have been outlawed from our country for many, many, many years," said U.S. Rep. Carolyn Maloney of New York, a senior Democratic member of the House Oversight and Government Reform Committee. She said she plans to introduce legislation to close the loophole.

Since 1979, the AP analysis found, at least 38 of 66 suspects removed from the country kept their Social Security benefits.

The Social Security Administration expressed outrage in 1997 over the use of benefits, the documents show, and blowback in foreign capitals reverberated at the highest levels of government.

Austrian authorities were furious upon learning after the fact about a deal made with Martin Bartesch, a former SS guard at the Mauthausen concentration camp in Austria. In 1987, Bartesch landed, unannounced, at the airport in Vienna. Two days later, under the terms of the deal, his U.S. citizenship was revoked.

The Romanian-born Bartesch, who had emigrated to the U.S. in 1955, was suddenly stateless and Austria's problem. Bartesch continued to receive Social Security benefits until he died in 1989.

"It was not upfront, it was not transparent, it was not a legitimate process," said James Hergen, an assistant legal adviser at the State Department from 1982 until 2007. "This was not the way America should behave. We should not be dumping our refuse, for lack of a better word, on friendly states."

Neal Sher, a former OSI director, said the State Department cared more about diplomatic niceties than holding former members of Adolf Hitler's war machine accountable.

Amid the objections, the practice known as "Nazi dumping" stopped. But the benefits loophole wasn't closed.

Justice Department spokesman Peter Carr said in an emailed statement that Social Security payments never were employed to persuade Nazi suspects to depart voluntarily.

The Social Security Administration refused the AP's request for the total number of Nazi suspects who received benefits and the dollar amounts of those payments.

Spokesman William "BJ" Jarrett said the agency does not track data specific to Nazi cases.

A further barrier, Jarrett said, is that there is no exception in U.S. privacy law that "allows us to disclose information because the individual is a Nazi war criminal or an accused Nazi war criminal."

The department also declined to make the acting commissioner, Carolyn Colvin, or another senior agency official available for an interview.

Rabbi Marvin Hier, the founder and head of the Simon Wiesenthal Center in Los Angeles, said the loophole should be closed.

"Someone receiving an American pension could live very well in Europe or wherever they settled," Hier said. "We, in effect, were rewarding them. It didn't make any sense."