WASHINGTON — Ken Salazar, a man of unnaturally sunny disposition in an often gloomy town, may be the happiest person in the Obama administration these days. He is going home to Colorado next week, provided his successor as interior secretary is confirmed as expected.

“I’ve had a glorious and joyful run,” he reflected on Thursday about his four years at the top of the Department of the Interior and, before that, his four years in the Senate. “Coming to work, I’ve just been living the dream every day.”

Mr. Salazar, 58, took over an agency that had been the scene of rampant financial scandal and political malpractice in the Bush administration and succeeded in restoring a measure of ethics and morale. He had the good fortune of suffering his greatest setback — the BP oil spill in the Gulf of Mexico that laid bare persistent flaws in the agency’s regulation of offshore oil and gas operations — relatively early in his tenure.

He hired an experienced former federal prosecutor, Michael R. Bromwich, to revamp the discredited Minerals Management Service, whose mission was to prevent such drilling disasters. Its successor agencies, although still short on money and staff, have tightened oil and gas permitting and regulation and have managed, so far, to remain scandal-free.