Mayor Bill de Blasio met with federal prosecutors in a Manhattan law office on Friday where he faced questions related to a criminal probe of his fundraising, the mayor's office said.

Prosecutors have been investigating whether or not donors to de Blasio's 2013 campaign or his former nonprofit, Campaign for One New York, were rewarded with favors. 

De Blasio, who agreed to speak voluntarily and without immunity to prosecutors, arrived at Kramer Lefin Naftalis & Frankel LLP, the firm of his defense lawyer Barry Berke, just after 9 a.m. 

The vehicle was swarmed by members of the press, held back by the NYPD, before a gate shut behind the SUV. A federal contingent including Andrew Goldstein, head of the public corruption unit in U.S. Attorney Preet Bharara’s office, was photographed arriving with deputy Tatiana Martins and prosecutor Russell Capone.

De Blasio spent about four hours at the law firm. He and his motorcade were seen leaving at about 1:45 p.m.

Bharara’s office and a spokesman for the FBI declined to comment on the meeting, as did representatives of City Hall. 

Investigators were expected to focus on the mayor's relationship with Brooklyn businessman Moishe Indig, who hosted a fundraiser for him in 2013, as well as other donors, including Harendra Singh and Gina Argento, the New York Times reported.

Eric Phillips, a spokesman for the mayor, said de Blasio and his staff "remain confident" they did not do anything illegal. 

"We hope our continued cooperation will help bring a swift conclusion to the U.S. attorney's review," Phillips said. "In the interest of protecting the integrity of this process, we will refrain from any further comment at this time."

De Blasio had previously met with state investigators who were looking into whether or not the mayor or his aides broke any laws fundraising for Democrats in an attempt to flip control of the State Senate from Republican to Democratic hands in the 2014 election.  

Legal experts have said that meetings with the government by a potential target are unusual because they carry risks, but de Blasio’s willingness to sit down may also indicate that his lawyers believe the evidence is not definitive and that he is likely to avoid charges.

-With Newsday and Reuters