Where a trial court finds offenses were improperly joined and severs a disqualifying offense, the defendant has not been convicted of a nondrug-related felony and therefore merits Proposition 36 probation. Appellant was charged with violation of a restraining order and possession of prohibited drugs. After arraignment, the trial court granted his motion to sever the charges. He was convicted of a misdemeanor violation of a restraining order and pled guilty to felony drug possession. When sentenced for the drug offenses, he was denied Proposition 36 probation because the court found the nondrug misdemeanor was part of the “same proceeding,” rendering him ineligible for Proposition 36 treatment. (Pen. Code, § 1210.1, subd. (b)(1).) He appealed. Held: Reversed. A defendant’s convictions occur in the “same proceeding” within the meaning of section 1210.1, subdivision (b)(1) if the charges are properly joined. (Pen. Code, § 954.) “The critical factor is not whether the charges were originally brought in a single pleading but whether the joinder was proper” under section 954. Here, the felony sentencing court was constrained by the earlier ruling that the offenses had been improperly joined and Proposition 36 treatment was mandated.