By Nate Raymond

NEW YORK (Reuters) - Former New York State Assembly Speaker Sheldon Silver lost a bid on Friday to dismiss the federal corruption charges he faces due to public statements a top prosecutor made that the once-powerful politician called prejudicial.

While U.S. District Judge Valerie Caproni said she was "troubled" by remarks Manhattan U.S. Attorney Preet Bharara made bundling Silver's case together with a broader commentary on corruption and transparency in New York politics, she declined to dismiss the indictment.

"Nevertheless, the parties are cautioned that this case is to be tried in the courtroom and not in the press," Caproni wrote.

Silver, 71, resigned as speaker after being first charged in January but remains the assemblyman for Manhattan's Lower East Side. He has pleaded not guilty to fraud and extortion charges.

His lawyers argued that an indictment unveiled in February should be dismissed, saying Bharara had made improper and prejudicial statements about Silver in a press conference the day he was charged, a speech on public corruption the next day and an interview later to MSNBC.

The remarks troubled Caproni, who said Bharara, while castigating Albany politicians violating ethical rules, "strayed so close to the edge of the rules governing his own conduct" that Silver had a non-frivolous argument for dismissal.

But Caproni said Silver's lawyers had failed to cite a single case where a court had taken the "extreme step" of dismissing an indictment because of publicity.

Silver's lawyers, Joel Cohen and Steven Molo, in a joint statement said they were pleased Caproni took exception to Bharara's conduct and "cautioned against future use of the tactics employed against Mr. Silver."

A spokeswoman for Bharara declined to comment.

Silver, a lawyer who became speaker in 1994, had long listed New York personal injury firm Weitz & Luxenberg on his financial disclosure forms as a source of income for representing its clients in cases.

An indictment said Silver used that position to mask more than $3 million earned for referring asbestos sufferers to the firm from a doctor whose research secretly received $500,000 in state funds at Silver's direction, as well as other benefits.

Silver never disclosed the state funding he organized for the doctor to Weitz & Luxenberg, the indictment said.

Prosecutors say Silver also received $700,000 in kickbacks by steering real estate developers with business before the state legislature to another law firm.

(Reporting by Nate Raymond in New York; Editing by Chris Reese and Lisa Shumaker)