A popular big-city mayor who lost a reelection bid amid a corruption investigation of his administration and several top donors has been appointed to a judgeship by the state’s governor.

Although former Los Angeles Mayor James Hahn was embroiled in a huge City Hall bribery scandal, California’s Republican governor, Arnold Schwarzenegger, has named the Democrat to the Los Angeles County Superior Court bench. Hahn is a lawyer, who served as Los Angeles City Attorney before being elected mayor in 2001.

As mayor, Hahn was investigated by federal and county authorities for illegally steering city contracts to prominent campaign donors, a scheme known in political circles as pay-to-play. Several of Hahn’s top donors were also investigated for laundering donations to his 2001 mayoral campaign and one was fined nearly $300,000 by the city Ethics Commission for laundering contributions.

Just last month, a Hahn administration commissioner (Leland Wong) was sentenced to five years in prison after convictions on 14 felony counts, including bribery, conflict of interest, perjury and embezzlement. During Hahn’s tenure Wong took tens of thousands of dollars from a Taiwanese shipping company seeking a lucrative airport contract.

Although Hahn was never charged or convicted with any crimes, his administration certainly lived in the shadow of corruption and the scandal clearly cost him reelection. This should make him an unlikely candidate for a judgeship.