It seemed inevitable that bad things would happen when President Bush and Vice President Dick Cheney packed the top posts at the Department of the Interior with lobbyists who had spent their careers representing the very industries they were now being asked to regulate. But it was left to Earl Devaney, the department’s inspector general  and the busiest gumshoe inside the federal bureaucracy  to demonstrate just how bad things could be.

In three extraordinary reports delivered to Congress this week, Mr. Devaney found that officials at the Minerals Management Service  the division responsible for granting offshore oil leases and collecting royalties  accepted gifts, steered contracts to favored clients and engaged in drugs and sex with oil company employees as part of what he described as a broader “culture of substance abuse and promiscuity.”

At the center of the scandal is the royalty-in-kind program, under which the service takes delivery of oil and gas in lieu of cash payments from energy companies, then sells it to refiners. The program is vulnerable to manipulation at either end of the transaction, by overvaluing the oil and gas when it is received or undervaluing it when it is sold.

The program obviously needs a complete overhaul. It has already been the subject of multiple investigations  by Mr. Devaney; Dirk Kempthorne, the interior secretary; the Justice Department; and Congress  for mismanagement and conflicts of interest. In an earlier report in 2007, Mr. Devaney found that the agency had failed  through negligence and possible ethical lapses  to collect billions of dollars in royalties from oil companies for leases in the Gulf of Mexico.