Bill Cosby just scored one of the best criminal defense lawyers in the country to defend him in his sexual assault retrial ... Tom Mesereau.
We're told Mesereau will be lead counsel in the retrial, set for November.
Mesereau has won some legendary cases ... he repped Robert Blake, who beat the rap for allegedly murdering his wife Bonnie Lee Bakley. And he successfully defended Michael Jackson in the singer's child molestation trial.
We're told Bill and Camille Cosby both signed off on Mesereau.
His first appearance in the case will be Tuesday.
We got Mesereau out last month, and he called the retrial a gigantic waste of time.