The attorney-advocate rule is a rule of ethics in the legal profession that prohibits an attorney from acting both as an advocate and as a witness in the same proceeding. The rule “has long been a tenet of ethics in the American legal system, and traces its roots back to Roman Law.” Kennedy v. Eldridge, 201 Cal. App. 4th 1197, 1208 (2011).
“Occasionally a lawyer is called upon to decide in a particular case whether he will be a witness or an advocate. If a lawyer is both counsel and witness, he becomes more easily impeachable for interest and thus may be a less effective witness. Conversely, the opposing counsel may be handicapped in challenging the credibility of the lawyer when the lawyer also appears as an advocate in the case. An advocate who becomes a witness is in the unseemly and ineffective position of arguing his own credibility. The roles of an advocate and of a witness are inconsistent; the function of an advocate is to advance or argue the cause of another, while that of a witness is to state facts objectively.”
Id. at 927-28.
Model Rules of Professional Conduct, Rule 3.7 (Lawyer as Witness):
(3) disqualification of the lawyer would work substantial hardship on the client.
(b) A lawyer may act as advocate in a trial in which another lawyer in the lawyer’s firm is likely to be called as a witness unless precluded from doing so by Rule 1.7 or Rule 1.9.
California Rules of Professional Conduct, Rule 3.7:
(a) A lawyer shall not act as an advocate in a trial in which the lawyer is likely to be a witness unless:
(1) the lawyer’s testimony relates to an uncontested issue or matter;
(2) the lawyer’s testimony relates to the nature and value of legal services rendered in the case; or
(3) the lawyer has obtained informed written consent* from the client. If the lawyer represents the People or a governmental entity, the consent shall be obtained from the head of the office or a designee of the head of the office by which the lawyer is employed.
(b) A lawyer may act as advocate in a trial in which another lawyer in the lawyer’s firm* is likely to be called as a witness unless precluded from doing so by rule 1.7 or rule 1.9.
 This rule applies to a trial before a jury, judge, administrative law judge or arbitrator. This rule does not apply to other adversarial proceedings. This rule also does not apply in non-adversarial proceedings, as where a lawyer testifies on behalf of a client in a hearing before a legislative body.
 A lawyer’s obligation to obtain informed written consent* may be satisfied when the lawyer makes the required disclosure, and the client gives informed consent* on the record in court before a licensed court reporter or court recorder who prepares a transcript or recording of the disclosure and consent. See definition of “written” in rule 1.0.1(n).
 Notwithstanding a client’s informed written consent,* courts retain discretion to take action, up to and including disqualification of a lawyer who seeks to both testify and serve as an advocate, to protect the trier of fact from being misled or the opposing party from being prejudiced. (See, e.g., Lyle v. Superior Court (1981) 122 Cal.App.3d 470 [175 Cal.Rptr. 918].)