A federal judge in New Orleans on Thursday ordered a new trial for Kurt Mix, the former BP engineer who was found guilty last year of deleting a string of text messages in an alleged effort to hamper the government’s criminal investigation of the 2010 Deepwater Horizon disaster.

In the strongly worded order that blamed the jury’s forewoman, as well as Mix’s own attorneys, U.S. District Judge Stanwood Duval Jr. vacated the conviction and granted Mix’s motion for a new trial.

Mix, who lives in Texas, is the first of five defendants charged in connection with the BP Gulf of Mexico oil spill, widely considered the worst environmental accident in U.S. history, to be tried. He faced a potential sentence of 20 years on the single count, but legal experts speculated that federal guidelines would call for a sentence of about 18 months.

Attorneys for Mix had asked Duval to vacate the jury’s guilty verdict on an obstruction of justice charge based on an interview Mix’s lawyer conducted with a juror after the trial. The juror told the lawyers that the forewoman acknowledged to the rest of the group that she overheard a conversation in the courthouse elevator that made it easier to render a guilty verdict.

At the time, the case appeared headed for a mistrial, after jurors told the judge they were deadlocked. After the jury forewoman’s revelation, Mix’s lawyers contended, the jury came to a decision, finding the engineer guilty of one obstruction count and acquitting him of another after more than nine hours of deliberations over three days.

Mix was brought in by BP to study how much oil was gushing into the Gulf of Mexico after its Macondo well erupted 50 miles off the Louisiana coast on April 20, 2010. He played no role in the fire and explosion aboard the Deepwater Horizon drilling rig or in the missteps by BP and other companies that led to the disaster, which killed 11 men.

In court filings and during a hearing earlier this year, Duval has been sharply critical of Mix’s lawyers both for interviewing jurors and for not informing him of their findings immediately.

BP did not immediately return a request for comment Thursday.

In his 29-page order granting the new trial, Duval said he weighed the “nature of the material and the method by which Mix’s counsel obtained it, and whether the intrinsic information would have affected the jury’s deliberations and the verdict.”

He said he was “available to all counsel through email and personal mobile phone contact at any time day or night, regardless of whether such contact was needed during the week or the weekend,” and that he found it “truly remarkable and frankly baffling to the court” that Mix’s lawyers did not inform him of their findings sooner.

In January, after Mix’s lawyers filed their motion for the new trial, Duval said he ordered the 12 jurors who arrived at the verdict to appear in court, where they were each interviewed separately.

During her interview, the forewoman testified hearing remarks in the elevator about how others also would be tried for the 2010 oil spill but denied repeating them to the other jurors or remarking that for her, the “weight of voting guilty was gone” after overhearing the remarks, Duval wrote.

Ultimately, her story didn’t hold up. Five other jurors testified during interviews that they heard the forewoman juror repeat what she heard on the elevator and that she said it would give her comfort in voting guilty, according to Duval’s order.

The judge concluded that the forewoman said this “at a critical time in the deliberations that is after the jury had deadlocked,” and said it “appears likely ... her statements were made specifically to influence the outcome of the decision.”

But Duval also stressed that Mix’s lawyers shared some blame, chastising them for interviewing jurors in the first place and then for taking two weeks to report the remarks to the court, which he described as “astounding.” Duval noted that the interviews conducted by lawyers seemed to violate his admonitions to jurors that they should “under no circumstances, except by court order ... disclose any information concerning the deliberations of the jury or for the purpose of obtaining evidence of improprieties in the jury’s deliberations.”

Having a juror discuss the deliberations in an affidavit “about which she was instructed to remain silent is beyond the pale,” he wrote.

All that said, Duval found that the possibility a juror tainted a deadlocked panel “raises a more problematic issue.”

“Clearly, a defendant is entitled to a jury that has not been influence by materials that have not been admitted into evidence,” the judge wrote.

Mix’s lawyers had already drawn the ire of the federal judge after filing a motion to disqualify him from the case on the grounds that the judge’s own pending claim against BP created a conflict of interest. Duval has sought payment, including punitive damages, for oil damage to his Grand Isle fishing camp after the 2010 spill.

Duval shot down that motion, calling the effort “completely devoid of merit.”

During a March hearing on Mix’s motion for the new trial, his lawyers and U.S. Department of Justice prosecutors argued about whether it was appropriate for Mix’s attorneys to have contacted jurors at all.

“One of my obligations is to protect the jury system. On the other hand, I have an obligation to make sure this trial was conducted as fairly as I was able to conduct it,” Duval said at the start of the hearing.

One of Mix’s attorneys, Joan McPhee, said they contacted jurors because they were “surprised and taken aback, frankly” by the guilty verdict and were interested “in understanding where we had gone wrong.”

Still, Duval said he was troubled by the maneuver. “You did something that was a mistake,” he told McPhee.

“It is flat not good practice,” he added, his voice rising.

Mix was indicted on obstruction of justice charges for deleting hundreds of text messages that he exchanged with a BP supervisor, Jonathan Sprague, and a BP contractor named Wilson Arabie. Mix had received numerous notices from BP to save his communications.

U.S. Justice Department prosecutors charged that Mix deleted the messages “corruptly” to dupe federal investigators about how much oil was spewing into the sea. They insisted that the timing of the deletions — coming days before the files were to be copied by a vendor BP hired to retain records — was intentional.

In November 2012, U.S. Attorney General Eric Holder said the indictments connected to the oil spill would serve as a warning to companies and their employees and “hold accountable those who bore responsibility for this tragedy.”

But Mix, along with BP supervisors Donald Vidrine and Robert Kaluza, who also were also indicted in 2012, have maintained essentially the same defense: that the government needed someone to take the fall for the disaster, and they were the easiest targets.

The two obstruction counts that Mix faced dealt with different strings of text messages that he was accused of deleting. In the count on which he was found guilty, Mix was charged with deleting in October 2010 about 200 messages that he exchanged with Sprague. In the other count, on which he was found not guilty, Mix got rid of 100 messages exchanged with Arabie.

All but 17 of the deleted text messages were later recovered by forensic experts.

David Rainey, BP’s former vice president of exploration for the Gulf, awaits trial on obstruction charges for allegedly lying to Congress about how much oil was gushing from the well. And Anthony Badalamenti, a former cementing technology director for Halliburton Energy Services Inc., was sentenced to one year of probation after pleading guilty last year to destroying evidence after the spill.

Follow Richard Thompson on Twitter, @rthompsonMSY.