First lady Melania Trump's immigrant parents have been sworn in as U.S. citizens, making them the latest beneficiaries of the kind of "chain migration" their presidential son-in-law would like to curb.

Michael Wildes, a lawyer for Viktor and Amalija Knavs, told reporters the Slovenian couple took the citizenship oath on Thursday in New York City. They had been living in the U.S. as legal permanent residents with green cards.

As the in-laws to President Donald Trump, they came and went from the ceremony at a Manhattan federal building flanked by Homeland Security police. In May, when the Knavses were spotted in the building to attend a meeting on their citizenship application, Wildes told reporters they wanted to "keep their immigration matters private at this time."

The Knavses were eligible for green cards and to apply for citizenship because their daughter is a citizen, having taken the oath herself in 2006, shortly after she married Donald Trump in 2005. (The first lady, born Melanija, changed her name to Melania Knauss when she started modeling in Europe in the 1990s.)

This is the usual way most immigrants to the U.S. get green cards and eventually apply for citizenship: through their links to spouses or close relatives who are already citizens. However, Trump has strongly criticized this kind of family-based immigration, which he calls "chain migration."

Melania and her parents aren’t the only members of Trump’s family to benefit from the policy he derides. The president's paternal grandfather and mother did, too, migrating from Germany and Scotland, respectively, to join siblings in New York. (Trump's first wife and mother to his three oldest children, Ivana, also is an immigrant, from Czechoslovakia.)

Nevertheless, in February, the administration laid out an immigration proposal that included a massive cut in family-based immigration, according to a White House briefing for congressional staffers and Trump allies hosted by Trump senior adviser Stephen Miller, the administration's leading advocate for reducing legal immigration to the U.S.

But even if that plan is enacted, which is not a given, it won't affect Trump's in-laws now that they have become citizens.

The Knavses live primarily in New York but have spent more time in Washington since Melania and her 12-year-old son Barron, who is close to his grandparents and speaks fluent Slovenian, moved into the White House. The youngest of Trump's five children, he now attends a private school in Potomac, Md., in the Washington suburbs.

Viktor, who at 74, is two years older than his son-in-law, and Amalija is 73, have been spotted often visiting the White House and boarding Air Force One to travel with the first family to Trump’s Mar-a-Lago club in Florida and his golf resort in Bedminster, New Jersey.

Viktor, a car dealer, and Amalija a textile-factory worker, raised Melania, 48, and her 49-year-old sister Ines (who also lives in New York now), in the rural industrial town of Sevnica, located about an hour from the Slovenian capital of Ljubljana. At the time, Slovenia was part of the former Yugoslavia and under Communist rule. Viktor was a member of the Communist Party, mostly for career advancement, but former Trump aide Hope Hicks told the New York Times that Knavs had never been an "active member" of the party.

Even today, Communist Party membership can be an impediment to gaining U.S. citizenship, thanks to the Immigration and Nationality Act of 1965. However, according to current U.S. Citizenship and Immigration Services policy, officials only automatically reject applicants who have been actively involved in the last decade. And since both Yugoslavia and the Slovenian Communist Party both ceased to exist more than 25 years ago, Viktor’s eligibility was not affected.

Contributing: Associated Press