Lee Baca’s sudden resignation comes as a pleasant surprise. Now, with the old sheriff out of the way, Los Angeles County can get on with choosing new leadership for the nation’s largest sheriff’s department and cleaning up the scandals in its law-enforcement force and jail staff.

But let’s be clear: This cleanup is a huge task. As Baca departs, the culture of violence and corruption that developed in his 15 years in charge remains. It will take both a strong successor and forceful oversight to repair the damage and prevent further abuses of the sort that led, in the most egregious of the department’s several scandals in recent years, to the indictments of 18 current and former sheriff’s deputies in December following an FBI investigation of jail inmate abuse.

County residents should hope for two things, for starters:

• A vigorous, forward-looking campaign for sheriff before the June election, ideally with more candidates jumping in.

• Permanent civilian oversight to play the role the Los Angeles Police Commission did in molding the modern LAPD.

Until county residents woke up Tuesday to the news that Baca, 71, is quitting at the end of January, it was expected that the 2014 campaign would pit the fourth-term sheriff against two leading opponents, former underlings Paul Tanaka and Bob Olmsted. The focus would have been on Baca’s defense of his record and his argument that he’s the man to fix what went wrong on his watch.

The chances of this being a constructive debate about the Sheriff’s Department’s future instead of its past look better with Baca out of the way. So do the chances of more candidates joining the race; efforts were under way Tuesday to persuade Long Beach Police Chief Jim McDonnell, a former second-in-command to LAPD Chief William Bratton, to reconsider his decision not to run for sheriff.

The likelihood of the L.A. County Board of Supervisors creating a civilian oversight commission for the Sheriff’s Department may have received a boost from, ironically, Baca. Monday, hours before the news of his resignation, Baca told supervisors he supports the proposal for a permanent panel, a turnabout from his previous resistance to the idea.

Last month the supervisors appointed public-corruption prosecutor Max Huntsman as an inspector general for the Sheriff’s Department. That’s a good first step, but only a first step, in imposing the oversight the agency needs.

Baca told reporters he’s stepping down because “I don’t see myself as the future, I see myself as part of the past.”

It’s a past with some bright spots. Major crime in L.A. County fell in Baca’s tenure (as it has elsewhere). He has been innovative in emphasizing education and job training for jail inmates.

But right now Baca’s legacy is months of news reports, investigations and lawsuits containing charges of inmate abuse and corruption cover-ups in the jails; deputies harassing minorities in the Antelope Valley, and highly questionable hiring practices.

There’s a lot to put right. It will require a strong new man or woman leading the department’s 18,000-member force, and vigilant citizens watching over them all.