WASHINGTON — The Trump administration on Friday escalated a battle with government ethics groups by declining to release the identities of individuals visiting with President Trump at his family’s Mar-a-Lago resort during the days he has spent at the private club in Palm Beach, Fla., this year.

The surprising move by the Department of Justice, which had been ordered in July by a federal court to complete its review of Mar-a-Lago visitor records, came after weeks of promotion by Citizens for Responsibility and Ethics in Washington, the liberal nonprofit group known as CREW, that it would soon be getting the Mar-a-Lago visitors logs.

Instead, on Friday the Justice Department released a State Department list of just 22 names — all of them members of the delegation of the Japanese prime minister — who visited the club in February for a meeting with President Trump.

The dispute centers on what kind of records related to private individuals visiting the president should be open to public inspection. The refusal to disclose the full list of presidential visitors’ names also brings renewed scrutiny to the president’s private business empire and raises questions about why the administration would want to withhold information that could reveal possible conflicts of interest.

CREW and its partners in the effort — the National Security Archive and the Knight First Amendment Institute at Columbia University — sued in April to get access to presidential visitor logs for Mar-a-Lago, the White House and Trump Tower in New York. CREW requested only a list of people explicitly visiting the president, not, for example, all Mar-a-Lago members or other guests who happened to be there on those days.

Federal law exempts the White House from the Freedom of Information Act, or FOIA, which requires public disclosure of government documents. But CREW and its partners argued that because the presidential visitor records are typically maintained by the Secret Service — which is part of the Department of Homeland Security — they should not be exempt from public release.

In July, Judge Katherine Polk Failla of Federal District Court in Manhattan ordered the Trump administration to release by September the “records of presidential visitors at Mar-a-Lago” that are subject to the open records law.

But the Justice Department, in a statement it sent to CREW, said it had decided not to release the names of everyone visiting with the president at Mar-a-Lago, arguing that many of the records are not covered by the law.

“The remaining records that the Secret Service has processed in response to the Mar-a-Lago request contain, reflect, or otherwise relate to the president’s schedules,” Chad A. Readler, acting assistant attorney general, wrote in response to CREW in a letter dated Tuesday, but delivered on Friday. “The government believes that presidential schedule information is not subject to FOIA.”

Noah Bookbinder, CREW’s executive director, said that the organization would challenge the Justice Department’s decision. The Obama administration had faced a similar lawsuit before it decided in late 2009 to start to make visitor logs public, a practice that stopped with Mr. Trump’s arrival.

“After waiting months for a response to our request for comprehensive visitor logs from the president’s multiple visits to Mar-a-Lago and having the government ask for a last minute extension, today we received 22 names from the Japanese prime minister’s visit to Mar-a-Lago and nothing else,” Mr. Bookbinder said in a statement. “The government does not believe that they need to release any further Mar-a-Lago visitor records. We vehemently disagree. The government seriously misrepresented their intentions to both us and the court. This was spitting in the eye of transparency. We will be fighting this in court.”

Tom Blanton, director of the nonprofit National Security Archive, said his group was told by a Justice Department lawyer that the Secret Service did not keep a formal log of visitors to Mar-a-Lago similar to what is maintained for the White House. Instead, Mr. Blanton said he expected on Friday to get copies of hundreds of Secret Service emails that listed the names of presidential visitors to Mar-a-Lago, which, once assembled, would represent as comprehensive a list as possible.

Mr. Trump visited Mar-a-Lago for 25 days between his inauguration and the middle of May, when the club closes for the summer. As with many of the clubs in Palm Beach, it is typically open during the resort area’s high season, which runs from Thanksgiving to after Mother’s Day.

He often brought an entourage of top White House officials with him, even using Mar-a-Lago as a place to meet with world leaders, like President Xi Jinping of China.
Mar-a-Lago membership lists obtained by The New York Times have given a hint of frequent guests at the club. The nearly 500 paying members — it costs $200,000 to join the club, plus annual dues — include dozens of real estate developers, Wall Street financiers, energy executives and others whose businesses could be affected by Mr. Trump’s policies.

William I. Koch, who oversees a major mining and fuels company, belongs to Mar-a-Lago, according to these lists obtained in early 2017, as did the billionaire trader Thomas Peterffy, who spent more than $8 million on political ads in 2012 warning of creeping socialism in America.

Correction: September 15, 2017
An earlier version of this article and an accompanying caption misstated how much time President Trump spent at Mar-a-Lago in the first months of his presidency. He visited for 25 days, not 25 times.
Correction: September 16, 2017
An earlier version of this article mischaracterized a federal court order related to visitors at Mar-a-Lago. The court ordered the release of all related records subject to the Freedom of Information Act, not a log of all presidential visitors to Mar-a-Lago.