Wallin, C. J.
The record in this action presents a state of facts which, so far as they are important to a decision of the question involved, may be stated as follows: The action is for a divorce from the bonds of matrimony, and was commenced by the personal service of a summons and complaint, which, after an order of publication was obtained, was made upon the defendant *128at Kansas City, Mo., the place of the defendant’s residence, on February 3, 1894. On April 14, 1894, the defendant by her attorney, Frank Gray, Esq., appeared in the action and served an answer to the complaint. The plaintiff’s ground of action, as stated in the complaint, was cruel and inhuman treatment. The marriage between the parties was celebrated at Kansas City in 1883, and two children were born of the marriage, both of whom were living with their mother at Kansas City when the action commenced, and ever since have been in her custody. The answer of the defendant denied the allegations of the complaint, and alleged that the plaintiff was not a resident of North Dakota in good faith, but was and is a resident Kansas City aforesaid; that plaintiff deserted the defendant in September', 1893, leaving the defendant and said children without means of support, and that, after such desertion, plaintiff went to the State of North Dakota with one-, with whom plaintiff now is and ever since has been living in open adultery, said-being a married woman, and not the wife of the plaintiff. On the nth day of May, 1894, a document signed by the defendant’s said attorney was filed with the clerk of the District Court in which the action was pending, which read as follows: “State of North Dakota, County of Richland — ss.: In District Court, Fourth Judicial District. Clinton G. Nichells, Plaintiff, vs. Minnie B. Nichells, Defendant. To W. E. Purcell, Attorney for the Above-Named Plaintiff: You are hereby notified that, in the above entitled action, the undersigned withdraws his appearance for the above-named defendant, Minnie B. Nichells and withdraws the answer by him interposed on behalf of said defendant, for the reason that the undersigned was retained to appear in said action in the month of February, 1894; that he furnished the defendant with a copy of the summons and complaint in said action, and, during said month of February, demanded of the defendant that he be put in communication with her attorneys, if any she had, in the City of Kansas City, Missouri; that he was instructed by the defendant to prepare and serve the said answer in said action, *129and to make a draft on the defendant’s representatives for his retainer in said action; that he prepared and served said answer in this action within the time by law prescribed after the service of the summons and complaint herein upon the defendant; that he demanded from the defendant and her representatives in said Kansas City, Missouri, the payment of a reasonable retainer for his appearance in said action on or about the 14th day of April, 1894; that defendant and the said representatives have failed, neglected, and refused to pay the undersigned any sum whatever as a retainer or for his fees in said action; that the represesentative of said defendant in Kansas City, Missouid, has been notified long prior to this date that, unless the retainer of the undersigned was paid, he would have nothing further to do with this action. — Dated May 8th, 1894. Frank Gray, Defendant’s Attorney.” On the same day (May 11, 1894) the trial court made and filed its findings of fact and conclusions of law, and directed a judgment to be entered dissolving the bonds of matrimony existing between the parties, whereupon said judgment was then formally entered in the judgment book. Preceding said findings of fact was the following recital made by the trial court: “The above-entitled action having been brought on for tidal before the court on this nth day of May, 1894, and it appearing to the satisfaction of the court that the summons and complaint herein were personally served upo.n the defendant at Kansas City, in Jackson County, State of Missouri, on the 3rd day of February, 1894, the same being in lieu of service by publication, which had been theretofore ordered by this court by an order herein filed; and the defendant having appeared by Frank Gray, Esq., her attorney, and having answered herein, and served her answer to the plaintiff’s complaint upon the attorneys for the plaintiff on the 14th day of April, 1894; and the defendant having on the 8th day of May, 1894, by a stipulation in writing herein filed, withdrawn her appearance and her answer in said action, and being, therefore, on this day, in default, — and the court having *130proceeded to hear the evidence adduced on the part of the plaintiff in support of the allegations of his complaint, and having duly considered the same, and being fully advised in the premises, now makes and files the following findings of fact.” The defendant, through her other attorneys, Messrs. Ball & Watson, of Fargo, N. D., made application to said District Court in July, 1894, and obtained an order to show cause before said court why said judgment should not be vacated, and the defendant be allowed to interpose a defense to the cause of action alleged in the complaint; said application being based upon a proper affidavit of merits and other affidavits, and a proposed amended answer to the complaint, which embodied, in addition to the defenses stated in the original answer, other defensive matter. After several adjournments, a hearing was had upon the order to show cause, and upon October 31, 1894, the trial court entered its order discharging the order to show cause and, denying the application to vacate said judgment, and refusing to allow the defendant to interpose her proposed amended answer. The case is brought to this court for review on appeal from said order.
Without adverting now to any of the facts contained in the numerous affidavits which were presented to the court upon the hearing of the motion below, it will be convenient here to pause and consider whether, upon the conceded facts appearing of record and already narrated, the District Court erred in denying defendant’s motion to vacate the judgment and allow her to interpose a defense to the merits of the action. In other words, was the judgment entered below upon the defendant’s alleged default a valid judgment, regularly and legally entered, or was such judgment illegally and irregularly entered? If the judgment was illegally entered, it would, of course, be prima facie valid, because it is conceded that the court entering the same had jurisdiction of the subject matter and of the parties to the action. But it is likewise true that if the judgment was irregularly entered — i. e. entered as a default judgment when there was no default in law or in fact existing, and while there was an issue of fact joined in the *131action upon a complaint and answer — then such judgment would be illegally entered, and hence vulnerable to attack by motion in the court which entered the judgment; and upon such motion, if seasonably made, the moving party would be entitled, as a matter of strict legal right, to have the judgment vacated. In such a case as that suggested, the motion would not be addressed to the discretion of the trial court, nor would it be an appeal to the favor of that court. Upon such a motion, if the judgment was illegally entered, it would be error to refuse to set aside the judgment, and the trial court would be without discretion in the premises. In reviewing such an order as that supposed, this court is never, in the attitude of reviewing a matter lying within the discretion of the court below. Applying the elementary principles of law and rules of practice to which we have adverted to the undisputed facts in this record, and above set out, the question is presented whether or not the judgment herein was a valid judgment regularly entered. We think it was not a valid judgment, and that its entry was illegal, and in violation of the most sacred legal rights of a suitor, viz. the right to appear in open court and there confront his adversary, the opportunity to present witnesses in his own behalf, and that right of paramount importance and of priceless value to every suitor in a court of law, — the right to be represented in court by faithful counsel, whose fidelity has not been tainted by hostile passion prejudicial to his client, or being swerved by selfish considerations personal to himself and inimical to the suitor whose cause hé has undertaken to defend. The attempted withdrawal of the defendant’s answer and appearance in this action contemporaneously with the open and avowed desertion of the case by the defendant’s counsel (for the reasons spread out upon the record) operated necessarily, and in this case speedily, to strip the defendant of every right we have enumerated, and to leave her cause to be sacrificed without a hearing and without a defender.
The facts involved call for some consideration of the authority, power, and duty of an attorney in conducting a cause in court, *132and the crucial question is whether Frank Gray, Esq., as defendant’s attorney in the action, in virtue alone of his professional relation to the cause, and without the knowledge or consent of the defendant, could legally withdraw the defendant’s answer and his own appearance in the case, at the time when he did so, and for the reason which he stated in the writing which was presented to the court, and upon which the court then and there declared the defendant to be in default. In our judgment, the reason for the attempted withdrawal was trivial and wholly inadequate, legally or morally, to justify the action of the counsel, and was also legally insufficient as a basis for the ruling of the trial court declaring defendant to be .in default for want of an answer. It will readily be conceded that an attorney that has been retained and has entered an appearance for a party in an action is, within his proper sphere, possessed of plenary authority and discretion, and in all matters appertaining to the remedy alone he may lawfully control, even against the wishes of his client, all of those processes which are strictly incidental to the regular course of procedure in the action. Nor do we question the right of counsel, under some circumstances, and when the act is done with an honest purpose to subserve the interests or to comply with the wishes.of his client, to withdraw his own appearance and the answer of the defendant, and thereby accelerate the entry of a default judgment against a defendant. Such authority is not infrequently exercised in courts of original jurisdiction in this and in other states, and it would undoubtedly be very dangerous to the interests of suitors to abridge such authority in cases where it can be properly exercised. I Lawson, Rights, Rem. & Prac. § 169. But the record before us presents no such facts as those we have supposed. ” In the case at bar the attempted withdrawal of the defendant’s answer and of her counsel from the case (while it was manifestly done to facilitate the entry of a default judgment against the defendant) was not professedly or actually done with the intention of promoting the defendant’s interests or of complying with her wishes. The one *133reason assigned for the withdrawal stated in the formal notice served on plaintiff’s counsel and filed in the trial court, and upon which the default of the defendant was promptly declared, precludes the idea that the action of counsel was taken with the purpose of promoting either the interests or the wishes of the defendant. It was on its face an act of bitter retaliation, and that alone, because it was not done as a means of expediting the payment of the fees claimed by counsel to be due from the defendant. If the withdrawal operated at all upon the claim of counsel for fees, its legal effect would be prejudicial to such claim. In fact, the act of deserting a cause without any justifiable excuse would wholly defeat a claim for counsel fees in the same cause. “The contract of an attorney or solicitor retained to conduct or defend a suit is an entire and continuing contract to carry it on until its termination.” 2 Greenl. Ev. § 142. In the absence of an express stipulation for fees in advance, the contract is single and entire, and no right of action accrues for fees until the services are fully performed. Bathgate v. Haskin, 59 N. Y. 533. We gather from the record in this case that defendant’s counsel did not demand of the defendant a cash retainer in advance, but, on the contrary, permitted himself to be retained as an attorney, and proceeded to enter an appearance and serve an answer for the defendant, without any advance retainer; nor is it claimed that there was ever an agreement for the payment of advance fees to defendant’s counsel. Under such circumstances, it is very doubtful, to say the least, whether an action would lie for fees at the time the cause of the defendant was abandoned by her counsel. But, be this as it may, nothing is clearer than the fact that defendants attorney had no warrant or excuse in law or morals for abandoning the cause of the defendant without giving his client ample notice and a full opportunity to procure either counsel to defend the case in court. 2 Greenl. Ev. § 142. Reverting to the notice of withdrawal, it appears therefrom that the notice bears date on the 8th day of May, and that it was filed in court on the nth day of May, 1894. It appears, after serving the answer, defendant’s counsel *134“demanded from the defendant and her representatives in said Kansas City the payment of a reasonable retainer for his appearance on or about the 14th day of April, 1894; that defendant and her said representatives have failed, neglected, and refused to pay the undersigned any sum whatever as a retainer or for his fees in said action; that the representatives of said defendant in Kansas City, Missouri, have been notified long prior to this date that unless the retainer of the undersigned was paid he would have nothing further to do with the action.” From this it appears that defendant’s counsel made a demand for fees on defendant’s representatives less than one month prior to his attempted withdrawal of defendant’s answer, and at some date prior to such withdrawal had notified such representative that unless the retainer was paid counsel “would have nothing further to do with the action.” It will be noticed that no exact time was fixed in the demand for fees within which they were required to be paid, or the alternative stated be suffered by the defendant. It is further noticeable that there was no threat or intimation conveyed in the demand for fees that counsel would, if the demand was not complied with, withdraw the answer and leave the defendant in default for want of an answer. The utmost scope of the threat was that the counsel would personally withdraw from the case if his demands were not complied with. This is quite different from a notice that he would withdraw the answer; and, in its effect upon the case, the simple withdrawal of counsel would, of course, leave the case at issue, and not to be tided until the next term of the District Court, which term, as defendant had .been previously informed by her said counsel, would not convene until the month of July, 1894.
Enough has been set out to clearly show that the defendant’s counsel, in attempting to withdraw the answer of the defendant at the time and under the circumstances stated, did so, not only for the express and advertised purpose of betraying the cause intrusted to his protection, and allowing judgment to be entered as for a default in answering the complaint, but did so without *135any previous notice to the defendant that he meditated any such drastic measures. We unhesitatingly characterize the course of counsel in attempting to withdraw the answer as an act of bad faith, and as such it was an act beyond the scope of an attorney’s authority, and hence, in legal contemplation, the act was without binding force or effect. The nature of the pretended act of withdrawal and the motive with wnich it was done were spread out in writing upon the records of the District Court before the default was entered, and hence we hold that it was error in the court below to direct the entry of a default judgment in the case. The judgment in its very inception was tainted with the vice of illegality, and hence, under the settled practice, was vulnerable to attack by motion to set it aside as an illegal judgment. Garr, Scott & Co. v. Spaulding, 2 N. D. 414, 51 N. W. 867. The defendant had the right to move the court below to set it aside, and in doing so the defendant was not in the attitude of appealing to the favor of the trial court. In justice to the defendant’s counsel, we will add that in holding that the attempted withdrawal of the answer was an act of bad faith we do not wish to be understood as stating or intimating that in our opinion counsel was influenced by any corrupt consideration moving from the plaintiff or his counsel.. The evidence in the record will warrant no such statement, and we distinctly disclaim any such inference. We nevertheless assert, and place our ruling on that ground, that the act of the defendant’s counsel was one of bad faith towards his client, and hence an act which was beyond his power to legally do or perform. We shall place our ruling upon familiar and elementary principles of the law governing the relation of attorney and client, and do not cite or expect to find a precedent which is on all fours in its facts with the case at bar. At the foundation of the trust relation which exists between an attorney and his client lies the fundamental doctrine that so long as the relation continues to exist the attorney is without power or authority to do any act in a cause which is confessedly inspired by malevolence and hostility to the client or to his cause, and the effect of which *136is necessarily injurious to the cause intrusted to the guardianship of the attorney. The cases cited below will illustrate this well settled rule: Herbert v. Lawrence, (Com. Pl.) 18 N. Y. Supp. 95; Howe v. Lawrence, 22 N. J. Law, 99; Ohlquest v. Farwell, (Iowa) 32 N. W. 277; Haverty v. Haverty, (Kan. Sup.) 11 Pac. 364; Quinn v. Lloyd, 36 How. Pr. 378; Dickerson v. Hodges, (N. J. Ch.) 10 Atl. 111; Simpkins v. Simpkins, (Mont.) 36 Pac. 759.
Enough has been said to fully dispose of the case presented in the record, and we will not prolong this discussion further, except to state that in our judgment there is ample in the affidavits presented upon the motion to have justified the trial court in granting the motion and opening the case upon the ground of surprise, under the authority conferred by section 4939 of the Comp. Laws. True, the application under that section of the statute would be addressed to the sound judicial discretion of the trial court, and would be in the nature of an appeal to the favor, and not in the nature of a demand of a strict legal right. But in that aspect of the application the refusal to grant the defendant an opportunity to be heard, in our opinion, presents a case of an unsound exercise of judicial discretion. It is urged by counsel that shortly after the divorce was granted — about one month thereafter —the plaintiff contracted another marriage with-, referred to in defendant’s answer, and that to now allow the judgment for a divorce to be vacated would be to invite results which may be disastrous to an innocent person, — yet unborn, — as well as the parties who have so precipitately entered into a new conjugal alliance. Upon authority, it is clear that judgments entered in divorce cases are open to attack in the same manner, upon the same grounds, and within the same periods of time as other judgments, and this court has already had occasion to apply this rule of law to a divorce case. Yorke v. Yorke, 3 N. D. 343, 55 N. W. 1095. See, also, Simpkins v. Simpkins, (Mont.) 36 Pac. 759; Cottrell v. Cottrell, 83 Cal. 457, 23 Pac. 531; Bell v. Peck, (Cal.) 37 Pac. 766. But, aside from authority, the rule commends itself to our judgment as a wise and conservative civic regulation tending *137to restrain divorced parties from entering into new matrimonial alliances with too much precipitation, and at a time when the decree which severed a former marital connection is still legally open to assault and reversal in the courts of the state where the judgment is entered. We conclude on this point with an apt quotation taken from the opinion of the court in Simpkins v. Simpkins, supra, which case much resembles this: "Now, under all these circumstances, for plaintiff to claim that his remarriage in this hot and indecent haste is pertinent upon this motion is a sorry sort of a reply to the motion of defendant setting up the pitiable facts disclosed by this record. Nor is the situation of the person whom plaintiff purported to marry a consideration that set aside the rights of the defendant.” Our conclusion is that the judgment was irregularly entered, and that the learned trial court erred in denying the defendant’s motion to vacate the judgment and allow the defendant to come in and defend her action. The defendant was not in default for want of an answer. The order denying the motion is reversed, and the case is remanded for further proceedings in conformity with the views expressed in this opinion.
All the judges concurring.