Jeffrey E. Thompson is thronged by journalists as he leaves the U.S. District Court of the District of Columbia on March 10 in Washington. (Evelyn Hockstein/The Washington Post)

Just after a prominent D.C. businessman admitted that he illegally funneled cash to Mayor Vincent C. Gray’s 2010 campaign, the District’s top prosecutor, Ronald C. Machen Jr., delivered a strong message before a bank of TV cameras.

Anyone else involved should “come forward and own up,” he said, because his office was “not going away.”

With the Democratic primary just over two weeks away, it appears increasingly unlikely that federal prosecutors would bring any criminal case against the mayor before D.C. residents cast their votes April 1.

But Machen’s bold pronouncement — and prosecutors’ assertion that Gray was in on the scheme — puts the pressure on.

When the U.S. attorney says “this is the tip of the iceberg, there’s nowhere to go but up, and up is the mayor,” said Georgetown Law professor Paul D. Butler, a former federal prosecutor whose specialty was public corruption.

Mayor Gray explains why he has declined invitations from the U.S. attorney for interviews related to the Thompson campaign funding scheme. (WJLA)

“It’s hard to say that the chief executive knew and, in fact, invited something criminal, and then not to prosecute the chief executive,” Butler said. “If there’s not a prosecution, I think people will want to know why.”

Gray has aggressively disputed contractor Jeffrey E. Thompson’s allegations in court Monday that the two worked together on a secret campaign, calling them “lies.” He said in a mayoral debate Thursday that he “knew nothing about the illicit activity that has now been alleged. I was not involved in it.”

Thompson’s guilty plea came after a nearly two-year legal battle with prosecutors that went to the Supreme Court. It was only after the government threatened to indict Thompson this year that the businessman agreed to talk to investigators, according to two sources familiar with the discussions.

At the heart of any case against the mayor would be whether prosecutors can prove he knew about the more than $660,000 “shadow” campaign. While the government has been painstakingly investigating the secret spending since the summer of 2011, Thompson’s guilty plea marked the first time prosecutors publicly stated their contention that Gray helped orchestrate the scheme.

Thompson, a former accounting and health-care executive, said in his plea agreement that Gray knew of his support and agreed to keep it quiet. The businessman said he devised a plan in which Gray would refer to Thompson in conversation as “Uncle Earl” so no one in city circles would know that he was supporting then-Mayor Adrian M. Fenty’s rival. Backing the sitting mayor’s opponent could be damaging to Thompson’s company, which did millions of dollars in city business each year.

Thompson also alleged that Gray gave him a one-page, $425,000 campaign budget request that the businessman then funded.

But those alleged interactions alone, legal experts say, may not be enough to prove that Gray knew about the shadow campaign.

Nathaniel B. Edmonds, a former Justice Department lawyer who was a lead prosecutor in the Jack Abramoff lobbying scandal investigation, said it can be “extraordinarily challenging trying to get inside the public official or candidate’s head.”

Former federal prosecutor Justin Shur said evidence that Thompson and Gray tried to conceal the businessman’s support by using a nickname may not be as powerful as it seems. In addition, Shur said, Thompson’s assertion that Gray shared his campaign expenses with a donor is not necessarily illegal.

“It’s one thing to say, ‘I will help support the campaign, but I can’t do so publicly because it’s bad for my business.’ But that is not the same thing as telling the mayor that you plan to make illegal campaign contributions,” said Shur, a former deputy chief of the Justice Department’s public-integrity section. There are other ways to show support that do not involve activities subject to reporting requirements, he said.

What Shur found potentially problematic for the mayor in the court papers filed Monday was Thompson’s account of his dinner meeting with Gray at the apartment of Jeanne Clarke Harris, a public relations consultant who admitted in court that she helped coordinate the shadow campaign and is also cooperating with the government. Thompson said, according to the plea deal, that he specifically told Gray that the money for the get-out-the-vote effort would pass through Harris, and that Harris and another associate would manage the effort in support of and in coordination with Gray’s campaign.

Prosecutors named Gray in court Monday at the request of the judge, but they have not spelled out what — if any — additional evidence they have that implicates the mayor. Machen said at the news conference that day that his office would not have come forward if prosecutors did not “corroborate every aspect of our investigation.”

Thompson’s testimony and cooperation would be key at any trial of the mayor.

Gray and his allies have called Thompson’s plea agreement, which could result in jail time of six months or less, a sweetheart deal, and questioned the businessman’s credibility as a potential witness against the mayor.

“For Mr. Thompson, it was Christmas in March,” Gray’s attorney, Robert S. Bennett, said in an interview. “It was a gift” for helping the government with the mayor, he said, and it “certainly goes to Thompson’s motivation” for talking.

By the government’s own calculations, Thompson could have faced up to seven years in prison for conspiring to break federal tax and campaign finance laws. But under the deal Thompson and prosecutors finalized March 7, he’ll get far less.

Typically, the presiding judge has broad discretion to sentence a defendant and can choose to depart from federal guidelines. Under Thompson’s agreement, the judge is bound to sentence him to no more than six months if he follows through on his promised cooperation and the government drops one of two counts against him at the time of sentencing.

Machen has stressed that Thompson could face two years in jail if he does not fully cooperate.

Many defense attorneys and former prosecutors say the lenient plea deal also underscores the value of Thompson’s cooperation and the government’s interest in using him as a steppingstone to get to other people, including the mayor.

In a corruption case against former Virginia governor Robert F. McDonnell, a star government witness has received immunity in exchange for cooperating with federal investigators. Legal experts said prosecutors are always prepared for the possibility that defense attorneys will try to attack the motivations of a government cooperator.

After such a lengthy investigation, Gray’s allies have also questioned why the deal — and the revelations — surfaced so close to the Democratic primary.

Former federal prosecutor Michael J. Leotta said the election timeline appeared to give Thompson’s defense team leverage in negotiating a favorable plea deal.

“To get Thompson to come in the door now, when it was important to the integrity of the electoral process, they had to cut him this great deal,” said Leotta, who handled political corruption cases as a prosecutor in Maryland.

Thompson was on the radar of federal investigators well before 2012, when they raided his home and office.

But gathering evidence to show Gray’s alleged role in the off-the-books scheme would take nearly two years. The intense effort by Thompson’s legal team to fight the government’s seizure of records was a key factor that slowed the investigation.

In November, Machen gave some hints about his timing, saying that “challenges and obstacles” were keeping him from closing out his investigation. He noted that four people associated with Gray’s 2010 campaign had pleaded guilty, and he made an unusual public pronouncement: “It’s not like we’ve been looking at this for three years and there’s no ‘there’ there. I mean, there’s ‘there’ there.”

By the time Gray announced in December that he would seek reelection, investigators were nearing the end of their inquiry, according to a source close the investigation. In late January, one of Machen’s obstacles was removed when the District’s attorney general allowed federal investigators to begin reviewing city government documents concerning a multimillion-dollar settlement with Thompson’s former health-care company.

About that time, prosecutors told Thompson’s attorneys that they were prepared to indict him.

By February, Thompson was sitting for lengthy interviews with federal investigators that would lead to his public acknowledgment that he had pumped more than $2 million in illegal donations into federal and local campaigns for many years.

As for Machen’s next move in the investigation, the U.S. attorney said, “We’re still running down some loose ends.”

Get updates on your area delivered via e-mail