BERLIN—The last known Nazi collaborator living in the U.S. was deported to Germany following a personal intervention by President Trump, U.S. officials said, ending years of legal and diplomatic wrangling between Washington and Berlin.

Jakiw Palij, a former member of the SS in German-occupied Poland and a postwar resident of Queens, N.Y., arrived in Germany on Tuesday morning on a U.S. government flight. He was the last of nine Nazi collaborators under deportation orders in the U.S., eight of whom have died in the last decade.

Berlin had long resisted receiving Mr. Palij, now 95 years old, because he wasn’t a German citizen and hadn’t been charged with any crime in Germany. Even now, experts said it was highly unlikely that he would face prosecution.

U.S. ambassador Richard A. Grenell took up the issue after his appointment this year during meetings with officials and key advisers to Chancellor Angela Merkel.

“The president told me directly to make it a priority to get the Nazi out,” Mr. Grenell said, adding that Mr. Trump, himself a native of Queens, had known about the case because of its prominence in the local press. Mr. Grenell later told reporters he had “made it a point” to raise the matter in every meeting he took with German officials.