In January, Senator Kirsten Gillibrand, Democrat of New York, said through a spokesman that she would use a prerogative given to home-state senators, the so-called blue slip, to try to block Mr. Berman’s confirmation if he were nominated by President Trump.

At the time, the spokesman, Glen Caplin, cited reports that Mr. Trump had personally interviewed Mr. Berman as part of the selection process. Mr. Caplin called those reports deeply disturbing because of conflicts of interest inherent in Mr. Berman’s “potential jurisdiction on matters that could affect the president personally.”

Ms. Gillibrand’s criticism was not directed at Mr. Berman but rather at President Trump “for conducting such an interview,” Mr. Caplin said.

On Wednesday, Mr. Caplin said in a statement: “The Court has acted responsibly within the law. It is troubling, however, that President Trump continues to attempt to undermine our institutions by doing an end-run around the U.S. Senate’s advise and consent responsibility for U.S. attorney nominations.”

Senator Chuck Schumer, a Democrat and the Senate minority leader, has also indicated opposition to Mr. Berman, having told the White House that he was “not supportive” of Mr. Berman’s potential nomination as United States attorney, The New York Times reported in January. Mr. Schumer’s office had no comment on Wednesday.

Mr. Berman, in a brief statement, said he had been notified of the appointment by the court’s chief judge, Colleen McMahon, and was grateful for the court’s action. He said he looked forward to “continuing the great tradition of this office to pursue justice without fear or favor.”

During his brief tenure, Mr. Berman has overseen several high-profile cases, including a trial that ended last month in the conviction of Joseph Percoco, a former senior aide to New York’s Democratic governor, Andrew M. Cuomo, on federal corruption charges.