BERLIN — The Nazi guard lived a quiet life in a racially diverse corner of New York City for decades, having lied on his United States immigration papers in 1949 about the type of work he did during World War II. But on Tuesday, he was deported to Germany, ending a 14-year battle to remove him from American soil.

The expulsion of the former guard, Jakiw Palij, rid the United States of the last known surviving Nazi war crimes suspect still residing in the country, bringing to a close a long-vexed effort by the government to deport him. It also handed President Trump, who had pressed strongly for Mr. Palij’s removal, a powerful talking point against critics of his immigration policies, by shifting the focus to the deportation of a man associated with the worst atrocities of the Holocaust instead of thousands of unauthorized immigrants whose stories are far more sympathetic.

Mr. Palij, 95, was first tracked down by investigators in 1993, and stripped of his American citizenship 10 years later when a federal judge found that he had falsely claimed in his visa application that he had worked on his father’s farm in Poland and at a German factory during the period when he was actually serving the Nazis at the Trawniki labor camp in occupied Poland.

In 2004, a federal immigration judge ordered that Mr. Palij be deported. But for years, American officials failed to persuade any country to accept a man born in what was once Poland and is now Ukraine, and who had served a murderous German regime.