The trial court abused its discretion in disqualifying plaintiff’s counsel from all phases of the case shortly before trial on the ground that he would be a witness at trial. The trial court erroneously failed to apply California Rule of Professional Conduct 3.7(3), which unlike the ABA rule from which it is drawn, allows an attorney to also testify with the client’s informed written consent unless disqualification is nevertheless required to protect the trier of fact from being misled or the opposing party from being prejudiced. Here, there was little evidence about the expected subjects of the attorney’s testimony, so likelihood of confusion or prejudice to the defendant couldn’t properly be weighed. Furthermore, if disqualification were justified, it should be limited to the trial and to those pretrial proceedings such as evidentiary hearings or depositions in which the attorney might appear in conflicting roles. The trial court also improperly failed to take into account the prejudice to plaintiff from loss of her attorney who had represented her in the case for the preceding four years and who was representing her pro bono or at a discounted rate.