
233 So.2d 150 (1970)
Edgar W. HUBBARD, Jr., Appellant,
v.
Barrie Bassett HUBBARD, Appellee.
No. 69-383.
District Court of Appeal of Florida, Fourth District.
March 23, 1970.
James E. Glass, of Rosenberg, Rosenberg, Reisman & Glass, Miami, for appellant.
S. Robert Zimmerman, Pompano Beach, for appellee.
TJOFLAT, GERALD BARD, Associate Judge.
On January 8, 1969, final judgment was entered granting appellee Barrie Bassett Hubbard a divorce from her husband, appellant Edgar W. Hubbard, Jr. The trial court retained jurisdiction to award fees to Mrs. Hubbard's counsel, and by subsequent order attorneys Dettling and Burns were given a fee of $5,000.00 and a like amount was afforded attorney S. Robert Zimmerman.
By this interlocutory appeal[1] from that order, appellant seeks to set aside the fee *151 awarded to Messrs. Dettling and Burns because attorney Edwin J. Dettling, Jr. was personally involved in the domestic controversy, served as the only witness to corroborate Mrs. Hubbard's grounds for divorce at the trial, and, as a matter of professional ethics, ought not to be paid a fee for his efforts. To place appellant's contention in proper context, a review of the attorney's relationship with the parties before they separated and, later, during the prosecution of the divorce action is necessary.
The record discloses that the Hubbards and the Dettlings were neighbors, presumably close friends who socialized frequently. The testimony was in dispute as to how intimate Dettling and Barrie Hubbard ultimately became. According to her husband, Edgar, attorney Dettling came by practically every evening for cocktails, often when Barrie was alone, until the parties separated. Barrie Hubbard and Dettling insisted that Hubbard, himself, was always present and that, in any event, no improper advances were ever made. However that may be, all were in agreement as to one thing: Hubbard eventually accused his wife of having an illicit relationship with the attorney. The subject became a source of constant agitation and eventually caused them to separate.
According to Dettling, both parties then attempted to retain him professionally. He declined, advising that he could not represent either of them. However, after it became apparent that Edgar Hubbard had followed that advice and had obtained other counsel, Dettling changed his mind and decided to represent Mrs. Hubbard. She hired him on an hourly basis at $75.00 per hour. Dettling's attempts to work out a property settlement soon failed; and thus Hubbard was sued for divorce, charged with extreme cruelty and habitual intemperance.
Edgar Hubbard then employed two private investigators to shadow his wife and Dettling. On two occasions the detectives discovered their subjects spending the night at the Seaside Motel, Pompano Beach, where the attorney had an apartment. Subsequently, Edgar Hubbard counterclaimed for divorce on the sole ground of adultery, and Dettling associated S. Robert Zimmerman as co-counsel in the case. When the trial judge later asked Dettling whether Zimmerman's employment was motivated by the adultery charge, he replied: "No, I don't believe it was, Your Honor." He explained that his firm had handled only a half-dozen divorce cases previously and that Zimmerman was hired, at his client's request, to be given "the primary responsibility for arguing matters in Court." The record is abundantly clear, however, that Dettling never withdrew from the case. By his own testimony he felt that he and Zimmerman represented Mrs. Hubbard jointly. He was involved in each step of the proceedings and sat at the counsel table throughout the trial, even though he was destined to become his client's most valuable witness. Dettling and his partner spent 311 hours on the case; and, despite the association of Zimmerman, the initial $75.00 per man hour fee arrangement was never adjusted.
At the final hearing Mrs. Hubbard was unable to establish a ground for divorce in her case-in-chief. However, her husband neglected to move for judgment at the close of her case. Therefore, the court proceeded to hear evidence on the counterclaim for adultery which consisted of the testimony of the two private detectives. Dettling's crucial testimony came in rebuttal. First he praised his client as a good wife and mother. Then he proceeded to furnish the testimony necessary to obtain the divorce. He simply corroborated some of the acts of extreme cruelty his client had recited, although his description of Hubbard as a "very heavy drinker" was not enough to show habitual intemperance. Dettling next spoke to the adultery issue. Although on pre-trial deposition he had refused to answer questions about his personal relationship with Barrie Hubbard, on *152 the ground that the answers might tend to incriminate him, at the trial he was quick to say that she had never been to his apartment. This buttressed her denial, and the trial judge held that the adultery was not sufficiently shown. In summary, perhaps the best evidence of Dettling's worth as a witness to his client appears in the following findings of fact and conclusions of law set out in the final judgment:
"It appears to the Court that the Plaintiff, BARRIE BASSETT HUBBARD, has proved her cause of action for divorce and is entitled to a divorce on the grounds of extreme cruelty of her husband. It would appear that her corroboration on the grounds of habitual intemperance is lacking and although the corroboration of the extreme cruelty would appear deficient when Plaintiff first closed her case, it would appear that her testimony upon the grounds of extreme cruelty is adequately corroborated by the testimony of Mr. Edwin J. Dettling, Jr., who testified in rebuttal. The Court will consider her case as reopened for consideration of his testimony as a part of her case-in-chief.

* * *.
"The Court finds that the evidence is insufficient to prove the alleged adultery of the Plaintiff-counter-defendant, and will therefore find against the Defendant-counterclaimant, EDGAR W. HUBBARD, JR., upon his Counter-claim." (Emphasis added.)
Rule B 19 of the Code of Ethics Governing Attorneys, usually referred to as Canon 19, states:
"Appearance of Lawyer as Witness for his Client.  When a lawyer is a witness for his client, except as to merely formal matters, such as the attestation or custody of an instrument and the like, he should leave the trial of the case to other counsel. Except when essential to the ends of justice, a lawyer should avoid testifying in court in behalf of his client."[2]
Citing the canon, our Supreme Court has held that a lawyer cannot be a material witness for his client's cause if he remains in the case. Dudley v. Wilson, 1943, 152 Fla. 752, 13 So.2d 145. In order to testify on the merits, arrangements must be made to withdraw from the case:
"If the urgency to testify arises after the trial starts, other counsel should take charge or if that cannot be done with convenience to the parties, a continuance should be granted after a full disclosure to the court unless it is shown that prejudice or injustice can be avoided. If counsel is aware of the necessity for his testimony before the trial begins, he should discuss the matter with his client and decide whether other counsel should be substituted or if he should retire from the case. The rule on the point is so clear that counsel should anticipate the reason and effect of his testimony beforehand and if it goes beyond formal matters he should advise his client and make proper arrangements for other counsel to handle the trial." Millican v. Hunter, Fla. 1954, 73 So.2d 58, 60.
If, from the very outset, the lawyer knows or can reasonably anticipate that his testimony will be essential to the prosecution of his client's case, he should decline the representation altogether.[3] This view is widely held, as the American Bar Association Committee on Professional Ethics and Grievances has written:
"Our courts generally hold that, in the absence of any statute to the contrary, *153 the testimony of an attorney for his client is competent and the fact that he is or has been an attorney in the case affects only his credibility. At the same time they condemn the practice as one that should be discouraged, holding that it is a breach of the rules of professional conduct for an attorney to accept employment in any matter in which he knows that he will be a material witness for the party seeking to employ him or, having accepted employment, for him to testify for his client except in those rare cases where, from some unforeseen event occurring in the progress of a trial, his testimony becomes indispensible to prevent an injustice. Frear vs. Drinker, 8 Pa. 52 [520]; Kaeser vs. Bloomer, 85 Conn. 209, 82 Atl. 112; Onstott vs. Edel, 232 Ill. 201, 83 N.E. 854 [806]; Connelly [Connolly] vs. Straw, 53 Wis. 645, 11 N.W. 17; Flood vs. Bollineier [Bollmeier], (Iowa) 138 N.W. 1102.
"Canon 19 states that a lawyer should not testify for his client `except when essential to the ends of justice'. A lawyer cannot therefore properly accept employment in any matter in which he knows, or has reason to believe, his testimony will be essential to the prospective client's case. An attorney who accepted employment under such circumstances would find it difficult to disassociate his relations to the client as a lawyer and his relation to the litigant as a witness. Roy [Roys] vs. First Nat. Bank of Monroe, 183 Wis. 10, 197 N.W. 237. Even if he actually could do so, the dual relationship would invoke embarrassing criticism. Although his zeal as a lawyer might not influence his testimony as a witness, an ever critical public is only too apt to place such a construction upon it. A lawyer should avoid not only all improper relationships but should likewise, in order to maintain the profession in public confidence and esteem, avoid all relationships which may appear to be improper."[4]
In the case before us, attorney Dettling was obviously aware of the ethical question here involved; for in the beginning he told the Hubbards that it would be inappropriate to represent either of them. His role as a potential witness was apparent, with Edgar Hubbard having implicated him in an extramarital affair. At least it was no longer in doubt when, following the Seaside Motel surveillances, Mrs. Hubbard was formally charged with adultery. The need for Dettling's testimony was not unforeseen and did not arise suddenly during the progress of the trial. It was evident a year before he was called to the stand. There was ample time for Dettling to withdraw from the case, especially after Zimmerman's association as co-counsel.
One of the principal reasons why Dettling should have remained silent is that his fee depended to a great extent upon the outcome of the case. By the time he took the stand he had spent close to 300 hours in time; and, at his $75.00 hourly rate, more than $22,000.00 was at stake. There is no indication in the record that Mrs. Hubbard could have paid any part of the fee. Surely Mr. Dettling was looking to Edgar Hubbard for payment. Canon 19 was designed to preclude a lawyer's testimony under these circumstances. As the Florida Bar Committee on Professional Ethics has pointed out:
"Without question, and at the very least, the canon was doubtlessly intended to preclude a cumbersome and distasteful situation in the mechanical trial of the law suit, and to avoid the embarrassment to an advocate of being required to comment upon the credibility of his own testimony. On the other hand, it is equally as likely that the canon was also intended to strike at an even more fundamental problem, the danger that the *154 identification of the lawyer with his client, and the probability or possibility that a fee, whether contingent or not, enhanced by the outcome of the suit, could invite perjury."[5]
We conclude that attorney Dettling breached Canon 19 as a matter of law when he testified for his client on the merits of the case. The sole issue before us on this interlocutory appeal is whether the trial judge abused his discretion in awarding Dettling and his partner the $5,000.00 fee. To affirm the trial court on this point would be to condone the breach and, perhaps, to encourage others to disregard the dictates of the canon, especially when an attorney fee lies in the balance. This, of course, we cannot do. We therefore hold that it was an abuse of discretion to award the fee. The appealed order is accordingly set aside insofar as it directs the payment of attorneys' fees to the firm of Dettling and Burns, and the cause is remanded for disposition not inconsistent with this opinion.
Reversed and remanded with directions.
CROSS, C.J., and WALDEN, J., concur.
NOTES
[1]  An appeal from the final judgment of divorce (Case No. 69-158) was dismissed, by stipulation of the parties, following its consolidation with this interlocutory appeal.
[2]  32 F.S.A. 615. Rule B 19 was a verbatim adoption of Canon 19, American Bar Association Canons of Professional and Judicial Ethics.
[3]  Similarly, his partner cannot properly accept the employment. See, Opinion No. 67-30, The Florida Bar Committee on Professional Ethics, reported in 42 Florida Bar Journal 105 (1968).
[4]  American Bar Association Committee on Professional Ethics and Grievances, Opinion 50 (December 14, 1931).
[5]  Opinion No. 67-30, The Florida Bar Committee on Professional Ethics, supra, note 3.
