“It felt very good,” he said.

Last year the Offshore Energy Center, a nonprofit group in Galveston supported by the oil and gas industry, inducted the minerals agency into its Hall of Fame for raising safety and environmental standards “in cooperation with the petroleum industry.” The minerals service gave out safety awards, too. Last year one went to BP.

On the morning of April 21, Mr. Oynes got an e-mail saying that 11 people were dead. The news got worse from there. Nothing would stop the toxic geyser about a mile below the sea. The blowout preventer had failed.

Soon, news accounts focused on a trail of studies, a decade long, that had questioned the reliability of the devices. One, commissioned by the Washington office of the minerals agency, reported a “grim snapshot” that “illustrates the lack of preparedness.” Mr. Oynes is still trying to understand why he knew nothing about them.

Time magazine placed him on its “dirty dozen” list of people most responsible for the spill. In New Orleans, The Times-Picayune reprised his role in the blown royalties affair. A congressman hailed his planned departure as a “an opportunity to begin anew.”

Soon the inspector general’s office released a report, long in the making, about the agency’s Lake Charles office. It depicted an ethics-free zone, where inspectors routinely took industry gifts and did favors for industry friends.

They went hunting and fishing on the companies’ tab, accepted company meals, went skeet shooting at the companies’ expense, and in one case flew on a private plane to watch Louisiana State University in the Peach Bowl. (One employee said he knew it was wrong, but did it because he was a “big L.S.U. fan.”) One inspector negotiated a job with a company while inspecting its platforms.

“Obviously we’re all oil industry,” said Larry Williamson, the district manager. “We’re all from the same part of the country. Almost all our inspectors have worked for oil companies out on these same platforms. They grew up in the same towns.”