“LIES. THESE are lies.” That was the reaction of D.C. Mayor Vincent C. Gray (D) to allegations aired in federal court Monday that he was deeply implicated in the illegal activities that helped elect him four years ago.

According to the mayor, the liar is businessman and longtime city contractor Jeffrey E. Thompson, who pleaded guilty Monday to violating city and federal campaign law. But the weight of evidence suggests that the person not telling the truth is Mr. Gray, who has consistently refused to answer questions, from prosecutors or reporters, about the scheme that helped subvert the 2010 election in which he defeated then-Mayor Adrian M. Fenty (D).

Federal prosecutors have spent three years in a painstaking probe of the campaign. They have obtained guilty pleas from eight people, including three longtime friends of Mr. Gray.

Mr. Thompson was long seen as a key to the investigation. His acknowledgment before District Judge Colleen Kollar-Kotelly that he spent more than $668,800 to bankroll an illegal “shadow campaign” for Mr. Gray and his confession of wrongdoing in other elections were overshadowed by his description of Mr. Gray’s alleged involvement.

Mr. Thompson said that, contrary to the mayor’s protestations over the years, Mr. Gray was a knowing and active participant in the conspiracy. Together they agreed to refer to Mr. Thompson as “Uncle Earl” to disguise his identity. When the shadow campaign wanted $400,000 for a get-out-the-vote effort, Mr. Thompson insisted that Mr. Gray personally ask for the money, the businessman said; in response, Mr. Gray submitted a one-page budget. Mr. Thompson’s largesse, according to prosecutors, continued after the election, with the businessman giving $10,000 to a “close family member” of Mr. Gray to settle campaign debts and $40,000 for home improvements to benefit a “close personal friend” of the mayor.

And, yes, there was a quid for all these quos, according to the federal case: Once Mr. Gray was in office, Mr. Thompson appealed to him through an associate to “expedite” a contract settlement worth millions of dollars to one of his firms. The Fenty administration had made clear it would not approve such a settlement; Mr. Gray okayed it months into his term — strictly on the merits, he has maintained.

Mr. Thompson, who has agreed to cooperate with the government probe, faces at most six months in prison, followed by three years of supervised probation. A light prison sentence, Mr. Gray suggested, was incentive for Mr. Thompson to lie.

Based on the guilty pleas now delivered to a federal judge, there can be no dispute that Mr. Gray’s election was tainted. Given that — and even accepting his continuing claims of ignorance about the shadow campaign — you might think Mr. Gray would do the city he claims to love the favor of dropping his bid for a second term. Apparently that isn’t going to happen, at least not yet.

Voters will have to weigh the evidence that has emerged, and that continues to emerge, and decide who is lying and who isn’t — and who deserves to be mayor, and who doesn’t.