Melania Trump’s parents, Amalija and Viktor Knavs, flank their lawyer, Michael Wildes, heading to their naturalization ceremony in Manhattan on Thursday.CreditCreditHolly Pickett for The New York Times

He said chain migration is a “dirtier” way of characterizing what he called “a bedrock of our immigration process when it comes to family reunification.”

Melania Trump had sponsored her parents for their green cards, Mr. Wildes said in describing the process by which the Knavses had become United States citizens. “Once they had the green card, they then applied for citizenship when they were eligible,” he said.

Even as his in-laws were going through the process, Mr. Trump was denouncing it. In November, he tweeted, “CHAIN MIGRATION must end now! Some people come in, and they bring their whole family with them, who can be truly evil. NOT ACCEPTABLE!”

Stephanie Grisham, the first lady’s communications director, said that because the Knavses are not part of the administration, “I’m not commenting on them.”

Ms. Grisham directed further questions concerning the president’s views on immigration — and the immigration status of his in-laws — to the West Wing, which did not immediately respond to emails and phone calls requesting comment.

The Knavses have a relatively high profile for presidential in-laws. They frequently travel with the Trumps and split their time between New York, Palm Beach and Washington, where they stay in the White House.

Since initial reports emerged in February that the Knavses had obtained permanent residency in the United States, there has been a lack of clarity about when or how the couple received green cards. And unless the couple themselves divulge the timeline of their citizenship process, the applications and petitions are protected by privacy law.

Under immigration statutes, the Knavses would have needed to have their green cards for at least five years in order to apply for citizenship, along with fulfilling character, residency and civic knowledge requirements. The time to process an application for naturalization in New York City typically ranges from 11 to 21 months, according to the U.S. Citizenship and Immigration Services.

Their lawyer said that the couple had met the five-year requirement, but added, “I can’t give further comment.”

News of the ceremony prompted an immediate response on Twitter.

Ana Navarro, a Republican strategist and political commentator, tweeted, “I guess when it’s Melania’s Family, it’s ‘family reunification’ and should be applauded. Everybody else, it’s ‘chain migration’ and must be stopped.”

But Mark Krikorian, the executive director of the Center for Immigration Studies, a think tank that supports tighter controls on immigration, said in an interview that the Knavses were following the law. “It’s the current system,” he said. “The question is what is the policy, and if a different policy is better, I’m all for it, but it doesn’t mean people working within the current policy are doing anything morally wrong.”

The president often rails against family-based immigration at his rallies, and has called it a pathway for terrorists to enter the country. He frequently reminds his audiences of the October terror attack in New York, where Sayfullo Saipov, an immigrant from Uzbekistan, plowed a pickup truck down a bike lane, killing eight people near the World Trade Center. While the president never names Mr. Saipov, who obtained his green card through the equally maligned diversity lottery, which grants visas to people from countries that have had fewer immigrants, he has been known to detail the attack.

“He said, ‘Hey look, there’s people, nice people, they’re relaxing, some are jogging,’” Mr. Trump said during a rally last week in Wilkes-Barre, Pa., lamenting the lives lost and those who were injured. “He decides to kill them.”

“They lost arms. They lost limbs. They lost so much. They lost their life. But they lost so much,” Mr. Trump added. “So, we have to change this and we’re going to change it.”

Typically, naturalization ceremonies at the Jacob K. Javits Federal Building at 26 Federal Plaza are large events, where groups of immigrants are sworn in as citizens en masse, after reciting an oath and the Pledge of Allegiance.

The Knavses’ lawyer said their ceremony was kept private for “security reasons.” Thomas Cioppa, New York district director of the U.S. Citizenship and Immigration Services, presided over the 20-minute ceremony, Mr. Wildes said. As is customary, the couple held their hands over their hearts and recited the Pledge of Allegiance, he said.

The Knavses, both in their 70s, raised Mrs. Trump in Sevnica, a Slovenian town of around 4,500 people. There, Mr. Knavs was a traveling car salesman and belonged to the Communist Party. Mrs. Knavs had harvested onions on her family’s farm, then worked in a textile factory, and sewed her two daughters’ clothes.

Mrs. Trump was born in 1970 and during her childhood Slovenia, then part of Yugoslavia, was ruled by Josip Broz Tito, a Communist dictator who nonetheless allowed more freedoms than other Eastern bloc leaders. When Mrs. Trump began her modeling career, while still a teenager, the whole family sensed opportunity, according to those who knew them in Slovenia.

According to news reports, she entered the country in 2001 on a so-called Einstein visa for “individuals of extraordinary ability” as a model. She became a United States citizen in 2006.

Mrs. Trump was not present for the ceremony, and her parents told their lawyer she was in Bedminster, N.J., where the president spends time in the summer at Trump National Golf Club.

The Federal Building also houses immigration court and the local offices of the Department of Homeland Security, and its subsidiary, Immigration and Customs Enforcement.

It is not infrequently the site of protests, but on Thursday, things were quiet as the first lady’s parents came and went. Curious about the cameras, bystanders wandered over. William White, a 74-year-old actor, said, with his eyebrows raised, “I’m happy for them.”

He went on: “It seems like we now have two immigration systems. One for the people who have no power, and one for the people who we are letting in through the V.I.P. entrance. We saw an example of that today.”

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Trump’s In-Laws Become U.S. Citizens Under ‘Chain Migration’. Order Reprints | Today’s Paper | Subscribe