Where trial counsel’s representation at preliminary hearing was compromised due to conflict of interest, the information must be set aside because defendant was denied a substantial right to the effective assistance of counsel. Harris was arrested for drug crimes. Unknown to Harris and the trial court, his retained attorney, Diaz, had been arrested for felonies by the same officer who arrested Harris and was facing charges to be prosecuted by the same entity (Los Angeles District Attorney) who was prosecuting Harris. Diaz represented Harris at his preliminary hearing, after which Harris was bound over. Represented by new counsel, Harris sought dismissal of the information based on the conflict of interest. He petitioned for relief after denial of the motion. Held: Petition granted. A criminal defendant has a constitutional right to the effective assistance of conflict-free counsel at his preliminary hearing. (U.S. Const., 6th Amend.; Cal. Const., art. I, § 15.) The fact that Diaz was arrested by the same officer who testified against Harris at the preliminary hearing, and faced prosecution by the same agency, gave rise to an actual conflict of interest on Diaz’s part. “Harris was denied the effective assistance of counsel becauseunknown to himhis counsel had a material conflict of interest with him at the time of his preliminary hearing. . . .” His nonstatutory motion to dismiss the information (not a Pen. Code, § 995 motion) was the appropriate procedure for his challenge to this denial of a substantial right because the error was not known or reflected in the transcript. His commitment was illegal and the information must be set aside without any affirmative showing of prejudice.