When the judge of a circuit court in which a prosecution is pending is connected with the accused or party injured, or is so situated in respect to the case as in his opinion to render it improper that he should preside at the trial, or if he has rejected a plea bargain agreement submitted by both parties and the parties do not agree that he may hear the case, he shall enter the fact of record and the clerk of the court shall at once certify this fact to the Chief Justice of the Supreme Court and thereupon another judge shall be appointed, in the manner prescribed by § 17.1-105, to preside at the trial.
Va. Code § 19.2-153