A federal judge ruled Thursday that prosecutors can introduce past statements and other evidence at the corruption trial of District Attorney Seth Williams showing that he clearly understood the laws he is accused of breaking.

In a 19-page order, U.S. District Judge Paul S. Diamond said prosecutors can use statements that Williams, who is charged with accepting bribes, made while his office prosecuted six elected officials for accepting bribes from a lobbyist.

In one of the statements, Williams said: "The citizens of the Commonwealth of Pennsylvania and the people of Philadelphia deserve nothing but honest and hardworking representation. They don't deserve elected officials who think that it is OK to sell their office. … There are no free passes when it comes to corruption and the elected officials who break the law…."

Federal prosecutors wrote in a May 17 court filing: "Williams made statements decrying their corrupt conduct, confirming his awareness of the same prohibitions which applied to his nearly identical (and much more lucrative) conduct charged in this case."

Thomas F. Burke, Williams' lawyer, had argued that the statements did not prove his client accepted bribes and were "irrelevant and inflammatory."

Diamond's ruling allows prosecutors to introduce evidence that Williams, while serving as the city's inspector general, enforced the city's prohibition against using city vehicles for personal use. Williams is charged with using government vehicles as his own personal fleet.

The ruling also allows prosecutors to introduce statements Williams made during a 2009 Ethics Board investigation for failing to report expenditures he made with campaign funds.

However, the jury will not be allowed to hear evidence about what happened with the investigation itself, because that would be prejudicial against Williams.

The judge also ruled against a prosecution request to introduce statements from a former finance director for Williams who expressed concern about the district attorney's spending campaign funds for personal use. The judge ruled that the statements did not appear to be relevant. The judge also sided with the defense in ordering that all witnesses be sequestered except for government witnesses.

Diamond made clear his rulings were tentative and both sides can ask him to reconsider parts of the order during the trial, which is scheduled to start June 19.

Burke, Williams' lawyer, could not be reached for comment.

Assistant U.S. Attorney Robert A. Zauzmer declined to comment on the judge's order.

Williams, 50, has denied any wrongdoing. He did not run for re-election in last month's Democratic primary.

Prosecutors allege that Williams misspent nearly $10,000 of campaign donations on personal expenses including massages, facials, and fancy dinners, as well as accepted gifts worth thousands of dollars from two wealthy businessmen seeking his assistance with their legal troubles.

Williams also allegedly stole $20,000 meant to pay for his mother's nursing home care to cover his mortgage and electricity bills.