The couple, Jonathan and Diana Toebbe, initially pleaded guilty in February to charges that they were involved in a conspiracy to sell secret submarines. Their plot had begun to unravel almost as soon as they set it in motion, when Brazilian intelligence officials turned over to the FBI a letter the pair had written anonymously in 2020, offering to sell nuclear secrets. The revelation set off a long quest to learn the couple’s identity and recover the secrets they stole. Mr. Toebbe had agreed to a plea deal that would send him to prison for 12 years, while Ms. Toebbe agreed to serve three years, which would likely see her out in two years. The judge’s ruling forced the Toebbes to withdraw their pleas, and Judge Gina M. Groh of the Federal District Court for the Northern District of West Virginia set a trial date for January. The lawyers will now have to see if they can work out a new plea deal that Judge Groh could accept or continue the trial. In her comments, Judge Groh suggested she would only accept a deal within the sentencing guidelines. This is likely to mean that both Mr and Ms Toebbe will face more than 15 years in prison. Such a large sentence could prompt Ms. Toebbe to go to trial to see if a jury would acquit her. The case captivated many. It combined spy books the couple tried to use, memory cards hidden in peanut butter sandwiches, gum wrappers and Band-Aid boxes, with the strains of suburban life, like frantic searches for babysitters so they could make a dead drop. Jonathan and Diana Toebbe pleaded guilty in February to charges that they participated in a conspiracy to sell secret submarines.Credit…West Virginia Regional Jail and Correctional Center, via Agence France-Presse/Getty Images But the case also raised questions about why a couple with a comfortable life in a middle-class neighborhood in Annapolis, Md., would risk everything to try to sell secrets to a foreign government. In court, a lawyer for Ms. Toebbe referred to personal difficulties she was dealing with, without elaborating. Even as Tuesday’s hearing began, Judge Groh expressed skepticism about the plea deals, suggesting the deal would allow Ms. Toebbe to get out of prison too soon. Judge Groh said Ms Toebbe’s crime made her “a crime of the worst kind, which is why the 36 months bothers me”. “There are lower-level drug dealers who go to prison for more than 36 months,” the judge said. Both prosecutors and defense attorneys argued that the plea deals were fair. In Mrs. Toebbe’s case, she would never be able to work as a teacher and would be very separated from her children. “She’s going to be someone who lives the rest of her life with that scarlet letter on her,” said Barry P. Beck, Ms. Toebbe’s lawyer. Prosecutors noted that Mr. Toebbe, who had been trained in both nuclear propulsion and the handling of classified data, bore most of the blame. But they added that he had cooperated with the Navy’s efforts to assess the damage, and the information he had passed on had been classified only as confidential, not secret or top secret. “His cooperation after the plea was substantial, very substantial,” said Jarod J. Douglas, an assistant United States attorney. “It was critical to a broader assessment of this behavior by the defendants that we may never have known about. The Navy would never have known what his behavior was and what its scope was without his cooperation.” But Judge Groh was not convinced. After a break, he read from an impact statement submitted by Navy Vice Admiral William Houston, which described the damage Toebbes had done to the submarine fleet and national security. “The nation has spent billions of dollars developing naval nuclear propulsion technology,” Judge Groh said, reading from the statement. “Sir. Toebbe’s actions have compromised the integrity of this protected information, thereby undermining the military advantage provided by decades of research and development.” The information Mr. Toebbe stole from the Navy, the statement said, could give foreign navies an opportunity to close a gap with the United States that would require extraordinary effort and resources to restore. After the hearing, Edward B. MacMahon, a lawyer for Ms. Toebbe, said the defense would return to work on the case. “We believed that this plea represented a fair resolution of the case and we are disappointed that the judge did not accept it,” Mr. MacMahon said. Evidence presented earlier in the trial showed Mr Toebbe grappling with questions about which country to approach, with Ms Toebbe having fewer qualms. Ms. Toebbe, a high school teacher with a Ph.D. in archaeology, had been deeply critical of President Donald J. Trump and had openly contemplated leaving the United States, former students said. But Ms. Toebbe’s defense lawyers noted that disgust with Mr. Trump or the state of American politics was hardly unusual. The US government has never identified which country approached the pair as it tried to keep many details – including how Mr Toebbe stole the secrets from the US Navy in Washington – out of court.