A State Bar judge has recommended a two-year suspension for a former San Francisco prosecutor who repeatedly drove while drunk and, the judge said, flashed his district attorney's badge at officers who pulled him over.

Marc Guillory, who now practices law in Oakland, was a deputy district attorney in San Francisco from 2006 to 2012, after four years as a prosecutor in San Bernardino County. He pleaded no contest to misdemeanor charges of drunken driving in 2007, 2009 and 2011.

When asked for identification after each incident, Guillory showed the officer his badge from the district attorney's office, and twice asked officers to let him go, State Bar Court Judge Pat McElroy said in a ruling made public Tuesday.

In 1999, two years before becoming a lawyer, Guillory crashed into a disabled bus, killing his cousin, who was a passenger in the car. His blood alcohol was below the legal limit when he was tested more than two hours after the accident, and he pleaded no contest to driving recklessly with alcohol in his system.

Guillory "has demonstrated his indifference to obeying the laws of this state" and "has acted with flagrant disregard for the safety of others," McElroy said. He said Guillory's requests for special treatment from the officers showed "corruption and moral turpitude."

McElroy said Guillory, who has prosecuted drunken-driving cases against others, has denied he has an alcohol problem and has failed to complete treatment programs. The judge rejected the State Bar's request to disbar the attorney but said Guillory's proposed 60-day suspension was too lenient.

Guillory can continue to practice law while the state Supreme Court reviews his case. He said by e-mail Tuesday that he disagrees with the judge's recommendation and is proud of his professional record.

"As a lawyer I focused on protecting the public and saving lives," but "unfortunately I did not take better care of my personal life," he wrote, citing stress from a lengthy divorce and custody dispute. Since the last incident in 2011, Guillory said, "I have worked hard to rehabilitate."