F.B.I. agents seized Mayor Eric Adams’s electronic devices early this week in what appeared to be a dramatic escalation of a criminal inquiry into whether his 2021 campaign conspired with the Turkish government and others to funnel money into its coffers.

The agents approached the mayor after an event in Manhattan on Monday evening and asked his security detail to step away, a person with knowledge of the matter said. They climbed into his S.U.V. with him and, pursuant to a court-authorized warrant, took his devices, the person said.

The devices — at least two cellphones and an iPad — were returned to the mayor within a matter of days, according to that person and another person familiar with the situation. Law enforcement investigators with a search warrant can make copies of the data on devices after they seize them.

A lawyer for Mr. Adams and his campaign said in a statement that the mayor was cooperating with federal authorities, and had already “proactively reported” at least one instance of improper behavior.

“After learning of the federal investigation, it was discovered that an individual had recently acted improperly,” said the lawyer, Boyd Johnson. “In the spirit of transparency and cooperation, this behavior was immediately and proactively reported to investigators.”

Mr. Johnson said that Mr. Adams has not been accused of wrongdoing and had “immediately complied with the F.B.I.’s request and provided them with electronic devices.” Mr. Adams had attended an anniversary celebration for an education initiative at New York University.

The statement did not identify the individual, detail the conduct reported to authorities or make clear whether the reported misconduct was related to the seizure of the mayor’s devices. It was also not immediately clear whether the agents referred to the fund-raising investigation when they took the mayor’s devices.

Mr. Adams, in his own statement, said that “as a former member of law enforcement, I expect all members of my staff to follow the law and fully cooperate with any sort of investigation — and I will continue to do exactly that.” He added that he had “nothing to hide.”

The surprise seizure of Mr. Adams’s devices was an extraordinary development and appeared to be the first direct instance of the campaign contribution investigation touching the mayor. Mr. Adams, a retired police captain, said on Wednesday that he is so strident in urging his staff to “follow the law” that he can be almost “annoying.” He laughed at the notion that he had any potential criminal exposure.

Spokesmen for the F.B.I. and the U.S. attorney’s office for the Southern District of New York, whose prosecutors are also investigating the matter, declined to comment.

The federal investigation into Mr. Adams’s campaign burst into public view on Nov. 2, when F.B.I. agents searched the home of the mayor’s chief fund-raiser and seized two laptop computers, three iPhones and a manila folder labeled “Eric Adams.”

The fund-raiser, a 25-year-old former intern named Brianna Suggs, has not spoken publicly since the raid.

Mr. Adams responded to news of the raid by abruptly returning from Washington, D.C., where he had only just arrived for a day of meetings with White House and congressional leaders regarding the migrant influx, an issue he has said threatens to “destroy New York City.”

On Wednesday, he said his abrupt return was driven by his desire to be present for his team, and out of concern for Ms. Suggs, who he said had gone through a “traumatic experience.”

“Although I am mayor, I have not stopped being a man and a human,” he said.

But he also said he did not speak with Ms. Suggs on the day of the raid, to avoid any appearance of interfering in an ongoing investigation.

The warrant obtained by the F.B.I. to search Ms. Suggs’s home sought evidence of a conspiracy to violate campaign finance law between members of Mr. Adams’s campaign, the Turkish government or Turkish nationals, and a Brooklyn-based construction company, KSK Construction, whose owners are originally from Turkey. The warrant also sought records about donations from Bay Atlantic University, a Washington, D.C., college whose founder is Turkish and is affiliated with a school Mr. Adams visited when he went to Turkey as Brooklyn borough president in 2015.

The warrant, reviewed by The New York Times, indicated authorities were looking at whether the Turkish government or Turkish nationals funneled donations to Mr. Adams using a so-called straw donor scheme, in which the contributors listed were not the actual source of the money. The warrant also inquired about Mr. Adams’s campaign’s use of New York City’s generous public matching program, in which New York City offers an eight-to-one match of the first $250 of a resident’s donation.

The federal authorities also sought evidence of whether any Adams campaign member provided any benefit to Turkey or the construction company in exchange for campaign donations.

This is not the first time Mr. Adams or people in his orbit have attracted law enforcement scrutiny. In September, Eric Ulrich, Mr. Adams’s former buildings commissioner and senior adviser, was indicted by the Manhattan district attorney, Alvin L. Bragg, on 16 felony charges, including counts of bribetaking and conspiracy.

In July, Mr. Bragg indicted six people, including a retired police inspector who once worked and socialized with Mr. Adams, on charges of conspiring to funnel illegal donations to the mayor’s 2021 campaign.

Separately, the city’s Department of Investigation was investigating the role of Timothy Pearson, one of the mayor’s closest advisers, in a violent altercation at a migrant center in Manhattan.

Mr. Adams has also had skirmishes with the law before becoming mayor. Soon after he was elected Brooklyn borough president, he organized an event to raise money for a new nonprofit, One Brooklyn, which had not yet registered with the state. The invitation list was based on donor rolls for nonprofits run by his predecessor, records show.

A city Department of Investigation inquiry concluded Mr. Adams and his nonprofit appeared to have improperly solicited funding from groups that either had or would soon have matters pending before his office. Mr. Adams’s office emphasized to investigators that the slip-ups had occurred early in his administration and promised to comply with the law going forward.

Earlier, while Mr. Adams was a New York state senator, the state inspector general found that he and other Senate Democrats had fraternized with lobbyists and accepted significant campaign contributions from people affiliated with contenders for a video lottery contract at Aqueduct Racetrack.

In response to a Times examination of his fund-raising record in 2021, Mr. Adams attributed the scrutiny in part to his race.

“Black candidates for office are often held to a higher, unfair standard — especially those from lower-income backgrounds such as myself,” he said in a statement then. “No campaign of mine has ever been charged with a serious fund-raising violation, and no contribution has ever affected my decision-making as a public official.” He added: “I did not go from being a person that enforced the law to become one that breaks the law.”

Mr. Adams is not the first city mayor whose fund-raising has attracted federal scrutiny. In 2017, federal prosecutors examined episodes in which Bill de Blasio, who was then the mayor, or his surrogates sought donations from people seeking favors from the city, and then made inquiries to city agencies on their behalf.

In deciding not to bring charges, the acting United States attorney, Joon H. Kim, cited “the particular difficulty in proving criminal intent in corruption schemes where there is no evidence of personal profit.” Mr. de Blasio received a warning letter about those activities from the city’s Conflicts of Interest Board.