At any stage of legal proceedings in which a county attorney is authorized to represent a county officer acting in the officer's official capacity, the county attorney may apply to the court for permission to withdraw from representation of the officer for cause. If the court allows the county attorney to withdraw, it shall appoint an attorney to represent the county officer. The costs of representing a county officer acting in the officer's official capacity shall be paid from the court expense fund or the general fund of the county.
Iowa Code § 331.759