NEW ORLEANS — The practices of the oil giant BP came under sharp attack on Wednesday in a courtroom here by an expert witness who said its negligence caused the 2010 explosion aboard a Gulf of Mexico drilling rig that killed 11 workers and spewed millions of barrels of oil.

A full day of testimony in the third day of a trial against BP was dominated by the witness, Alan R. Huffman, a petroleum geophysicist who was testifying for the government and private plaintiffs. Mr. Huffman accused BP of submitting misleading and selective data to federal regulators while drilling the Macondo well and of playing “fast and loose” with a safety test intended to measure the offshore well’s stability.

Mr. Huffman, who has worked for several major oil companies, also said BP had been irresponsible to continue drilling below 18,000 feet when the company should have known that the well was unstable. “This was beyond imprudent,” he said. “It was unsafe and dangerous.”

BP’s share of responsibility is a principal focus of the trial, and is also central to a settlement proposal offered by the Justice Department and five gulf states that are demanding that BP pay $16 billion in spill-related penalties and fines. If there is no settlement, the multiphase trial will determine not only responsibility for the accident but also how many millions of barrels of oil was actually spilled.