D.C. Councilman Jim Graham "demonstrated inappropriate preferential treatment" when he considered his vote on the city's $38 million lottery contract, but the District's ethics board ruled Thursday that a legal technicality left "little benefit" to conducting a formal review and abandoned its probe.

"Given the substantial evidence that Councilmember Graham violated the District's code of conduct, we would vote to commence a formal investigation," the three-member panel wrote in a 27-page opinion. "We decline to do so because the board is without the ability to sanction Councilmember Graham for his misconduct."

The ethics board excoriated Graham in its ruling, saying he had offered to trade his vote for the lottery contract in exchange for a company dropping its bid to develop a property owned by Metro.

At the time of the exchange in 2008, Graham was a member of both the D.C. Council and the transit agency's board, and the ethics board said the conduct was "a move designed to benefit ... a campaign contributor."

But the board said it was ending its inquiry, despite what it called "a substantial body of evidence that Councilmember Graham violated at least three provisions of the District of Columbia code of conduct."

The panel ruled that because the troublesome conduct took place before the ethics board existed, prosecuting Graham would violate the U.S. Constitution.

"To proceed with an evidentiary hearing would require the board, its staff and Councilmember Graham to invest significant time and resources to prosecute and defend an action where no sanction could be imposed," the board said. "We find this to be an unwise use of resources."

Graham denied he acted improperly and lashed out at the ethics board, even as he notched a major legal victory.

"I'm pleased it was dismissed, but I categorically deny that there was any financial motivation for me to reach the conclusions that I did," Graham said. "It's obviously upsetting to see something said that has no evidence to support it and to be said without me having the opportunity to have my testimony heard."

Graham's lawyer William Taylor III complained that the "hypothetical decision" would leave Graham with "a blot on his reputation."

Taylor also said he was considering Graham's legal options because he thought it was "unfair and unwise" for the board to have offered the observations that it did in its decision.

Although the ethics board's decision seemingly ends the city-level investigations of the lottery contract -- there have been at least three, none of which resulted in sanctions against Graham -- a federal grand jury continues to investigate the matter.

Taylor said Graham, who left Metro's board in 2010, is not a subject of that probe.