A judge declined Tuesday to throw out federal corruption charges against former Virginia governor Robert F. McDonnell (R) and his wife, Maureen, or to separate their cases, ordering that proceedings move ahead toward a single jury trial in July.

The rulings by U.S. District Judge James R. Spencer — though not particularly surprising — are a significant loss for the McDonnells, who had hoped to dismantle the prosecution’s case long before a jury heard it. There will be other important legal battles in the months to come, but defense attorneys must now turn their attention to winning the case at trial.

“This train is going to the station, one way or another,” said Jacob S. Frenkel, a white-collar criminal defense lawyer at the Shulman Rogers firm, who is not involved in the case. “The likely outcomes here — no matter what motions get filed from here forward — are either a plea or a trial. . . . The likelihood of the judge doing anything that will reconfigure this case is near nonexistent.”

The McDonnells were charged this year in a 14-count indictment that alleges that they lent the prestige of the governor’s office to Richmond area businessman Jonnie R. Williams Sr. and a company he used to run, Star Scientific, in exchange for gifts and loans. They have pleaded not guilty, and a trial is scheduled for July 28.

On Tuesday, Spencer rejected two of the defense attorneys’ most significant requests, declining to dismiss the corruption charges or to separate the McDonnells’ cases. He also rebuffed a defense effort to remove from the indictment allegations about Maureen McDonnell’s buying and selling Star Scientific stock, and he would not let the McDonnells have access to grand jury information.

Legal experts not affiliated with the case said Spencer’s decisions were predictable. Such high-profile prosecutions are rarely thrown out before they reach a jury, and the Eastern District of Virginia — the federal jurisdiction that includes Richmond — is generally known as a “very favorable place for the Justice Department to bring cases,” said Scott Fredericksen, a lawyer with Foley & Lardner.

But Fredericksen said he was surprised that Spencer moved so rapidly after hearing arguments on the issues Monday. The defense attorneys — Henry Asbill of Jones Day, John L. Brownlee of Holland & Knight and William Burck of Quinn Emanuel Urquhart & Sullivan — had presented strong arguments on legal issues that are not completely settled, Fredericksen said.

“I think these arguments will have real traction on appeal, ultimately, if there’s a conviction,” Fredericksen said.

A Justice Department spokesman and an attorney for Robert McDonnell declined to comment. An attorney for Maureen McDonnell did not respond to phone and e-mail messages seeking comment.

In arguing that the corruption charges be dismissed, defense attorneys said actions that the McDonnells took for Williams and Star Scientific — including arranging meetings with state officials and promoting Star products — were not “official.” To substantiate the corruption charges, prosecutors have to prove that the McDonnells performed or promised to perform “official” acts in exchange for Williams’s largesse.

Spencer ruled that what the McDonnells did for Williams could be considered official “as a matter of law.” He cited the successful prosecution of former congressman William J. Jefferson (D-La.), who was convicted in a corruption case in which he was accused of using his position to obtain bribes related to business ventures in Africa.

The ruling, though detrimental to the McDonnells’ defense, does not dismantle it. Spencer noted that jurors would ultimately decide whether the McDonnells did anything illegal.

“Whether Defendants’ conduct in fact constituted ‘the corruption of official positions through misuse of influence in governmental decision-making’ is a question for the jury based on the evidence adduced at trial,” Spencer wrote.

In declining to separate the cases of the former governor and his wife, Spencer declared, “Generally, defendants who are indicted together should be tried together,” and he ruled that the McDonnells had “failed to meet their burden to show that a joint trial will result in a miscarriage of justice.”

Separate trials would have given the McDonnells a significant strategic advantage, experts said. Defense attorneys said that if the couple were tried before different juries, Maureen McDonnell would probably agree to testify — without fear of incriminating herself — that her husband was largely unaware of her dealings with Williams. And the former governor would be able to testify on his own behalf without his wife’s restricting what he said through marital privilege.

The decision not to sever the two cases was perhaps foreshadowed last month when Spencer ruled that defense attorneys could not keep hidden from prosecutors declarations to the court detailing their clients’ prospective testimony at separate proceedings.

Experts said that if the McDonnells are convicted, Spencer’s rejection of each motion could serve as grounds for an appeal.