This appeal is from an order denying the' motion of J. G. James for an order to vacate and set aside the judgment made and entered herein on the nineteenth day „ of May, 1897. The motion is based upon affidavits, pleadings, and files in the case, minutes of the court and certain deeds of conr veyance, all of which are embodied in the bill of exceptions. brought up with the appeal. The facts of the case are about these: William Johns and Thomas Poyser were owners and in-*136possession of fractional section 4, lying north, of the Laguna de Tache grant, in township 18 south, range 19 east, Mount Diablo base and meridian, containing four hundred and eighty acres, more or less. The plaintiff canal company entered upon this fractional section without permission of Johns and Poyser, constructed levees and dams, over and upon said section, and across and in the bed of a natural stream of water called North Fork of Kings river, flowing through said section, without the consent or knowledge of said Johns and Poyser. In 1889 the said Johns and Poyser sold and conveyed said fractional section 4 to the defendant L. Y. Montgomer}', and the said Montgomery, to secure the payment of a sum of four thousand dollars purchase money, mortgaged said lands to said Johns and Poyser. Thereafter Poyser sold and assigned his entire interest in and to said mortgage to said Johns, and he became sole owner thereof. Thereafter the defendants Montgomery commenced to dig and tear down and remove the said levees and dams, and the plaintiff thereafter, on the 5th of December, 1891, commenced this action in the superior court of Fresno county against said Mont•gomerys, and obtained a temporary injunction against said defendants Montgomery restraining them from digging up and tearing down said levees and dam. Thereafter, on January 2, 189.3, the defendants filed an answer to said complaint, and at the same time a cross-complaint, in which it was alleged that the said canal had been constructed across said land as stated, and •that the same obstructed and dammed up a natural watercourse and backed the water up over the banks and upon the lands of the said defendants; that the same was a nuisance and caused great damage to the defendants, and asking that said nuisance be abated. Thereafter, on September 19, 1896, said L. Y. Montgomery resold said fractional section 4 to William Johns, and the said Johns satisfied and released the mortgage, and canceled said debt due him from said Montgomery. Thereafter, on October 13, 1896, said Johns sold and conveyed forty acres, more or less, of said section 4 to said J. G. James, and the said James paid therefor the sum of six hundred dollars. Thereafter, on the first day of December, 1896, by leave of the court, James filed, his complaint in intervention in this action. In his complaint in intervention said James set up his ownership of a por*137tion of said section 4, and alleged that the North Fork of Kings river is a natural stream or watercourse, and that during ordinary stages of water it has and continues to carry down and through said track a continuous stream; that prior to the action of the plaintiffs in constructing their canal the greater part of the waters of Kings river were accustomed to and did flow in their natural channel through said North Fork of the Kings river by and past said tract of land, and that Johns and Poyser, grantors of the intervenor, were the owners and in possession of the tract of land during the time plaintiffs wrongfully entered upon the same and obstructed said natural watercourse; that Johns intended, after repurchasing said fractional section 4, to sell and convey the forty acres to J ames, as stated, and said Montgomery consented and Agreed thereto, Imowing at the time that said James wanted to and intended to defend said action for his own use and benefit, and asks affirmative relief that the plaintiff be restrained and prevented from maintaining or continuing said dam and canal across the bed of said North Fork of Kings river.
Thereafter, on December 22, 1896, W. C. Graves was substituted as the attorney of record for the defendants in place of R. B. Terry, the defendants signing the following consent:
“We hereby consent to the foregoing substitution of attorneys, the same having been made at our special instance and request.
“JOHN MONTGOMERY and
“L. Y. MONTGOMERY.”
Plaintiff’s attorney admitted service of notice of substitution of attorneys for the defendants December 24, 1896. Thereupon it was agreed between the defendants and their substituted attorney, W. C. Graves, and James, that the complaint of said James in intervention should be withdrawn without prejudice, and that said James should maintain and defend the action in the names of the said John and L. Y. Montgomery for his, James’, own protection and benefit, and thereafter said Graves, as such attorney, May 10, 1897, filed an amended answer and cross-complaint, in the names of said defendants John and L. Y. Montgomery, but in the interest and for the benefit of said James, according to said agreement. May 19, 1897, the following stipulation, dated April 17, 1897, was filed:
*138“Whereas, all matters of dispute and difference have been settled in the above-entitled action, and the defendants admit and agree that the plaintiff is entitled to judgment as prayed for in the plaintiff’s complaint, except that it is understood and agreed he is not entitled to and does not claim any judgment against the defendants, and the defendants are not entitled to and do not claim any judgment against the plaintiff for damages in said action; now, therefore, it is understood and agreed that the plaintiff may take judgment in said action as prayed for in plaintiff?s complaint, except that no judgment for damages or costs shall be entered against the defendants, but that otherwise plaintiff is entitled to and shall have the relief sought in said action, and the defendants request that judgment herein be entered accordingly.”
Upon this stipulation the judgment in question was entered May 19, 1897. It recites: “Whereas, it appears to the court that the defendants above-named have consented in writing that plaintiff may have and is entitled to judgment in said action as prayed for in plaintiff’s complaint, except that no judgment for damages or costs shall be entered in said action in favor of the plaintiff or against defendants, but that otherwise plaintiff is entitled to the relief sought in said action, defendants requesting in writing that judgment be entered accordingly; now, therefore,” et cetera.
The motion to set aside and vacate the judgment entered upon such stipulation is based upon the ground, among others, that .James was the real party defendant interested in the subject-matter in controversy in said action, and that the defendants Montgomery had no interest therein, or in defending the same, since the conveyances and substitutions already referred to; all of which was known to the plaintiff and its attorney; .and that said purported stipulation made by said Montgomery was a fraud upon the rights and interests of said James and upon the court.
There can be no doubt that, after the conveyances and substitutions referred to, James was the real party in interest as defendant in the subject-matter in controversy in' said action in place and stead of the nominal defendants. The stipulation signed by them states that “all matters .of dispute and difference *139have been settled in the above-entitled action.” What matters of dispute and difference have been settled? The only matter in dispute was as to the right of the plaintiff to maintain its canal in the manner in which it constructed the same along and across the tract of land known as fractional section 4. This right was asserted by the plaintiff and denied by the defendants, and also by the intervenor James, and the only way that maiter in dispute is shown to have been settled, as far as the plaintiff and nominal defendants are concerned, is by the sale and transfer of all interest of the defendants in and to the premises in question, to wit, fractional section 4. The showing made in support of the motion of appellant was all in this line. The affidavit of the appellant James states that while the action was pending defendants “conveyed to William Johns all their right, title, and interest in and to said section 4, over, along, and upon which said canal, dam, and other obstructions have been constructed by said plaintiff,” and further states his purchase of the forty-acre tract for six hundred dollars, and “that thereafter, and while said action was still pending, this affiant and the said defendants came to an agreement in and by which it was agreed between them that affiant would withdraw his said complaint in intervention, and would undertake to carry on and maintain defense to said action in the name of the defendants for his, affiant’s, own protection and benefit, and that he did, pursuant to said agreement, withdraw his said complaint in intervention, and did procure Walker 0. Graves, his own attorney, to be substituted in lieu of the attorney for defendants in said action, and that he has ever since and up to the time said action was attempted to be dismissed maintained and carried on the defense of said action at his own cost and expense, and free of any costs or expense to said defendants.....That the plaintiff well knew long prior to the said seventeenth day of April, 1897, that this affiant was defending said action in the name of said defendants for his own use and benefit.”
The appellant’s attorney, Graves, in his affidavit states that after the filing of his petition in intervention he met L. Y. Montgomery, one of the defendants, “and it was then and there agreed between the said L. Y. Montgomery, acting for himself and his codefendant John Montgomery, and this affiant, acting *140for J. G. James, that affiant would withdraw the complaint of J. G. James in intervention in the above-entitled action, and would undertake to carry on and maintain the defense to said action in the name of the defendants, and for J. G. James’ own protection and benefit, and free of any cost or expense to the defendants,” and further details the steps that were taken thereafter pursuant-to said agreement, substantially the same as in the affidavit of the appellant James, and adds: “And affiant further states that upon the withdrawal of said complaint in intervention he stated in open court that he would defend the action in the name of defendants for the benefit of J. G. James, or words to that effect were used, and plaintiff knew long prior to the seventeenth day of April, 1897, that J. G. James was defending said action in the name of the defendants for his own use and benefit.”
In Johns’ affidavit he says: “On or about the twenty-first day of August, 1896, and while said action was pending in said court, the said L. Y. Montgomery proposed to affiant to sell and conve)r the said land back to him if affiant would release and discharge said mortgage and cancel the debt secured thereby; this affiant consented and agreed to said proposal, and thereupon, in pursuance thereof, said L. Y. Montgomery did, on the said nineteenth -day of September, 1896, by a deed of that date, reconvey said fractional section to this affiant.” And further: “And when this affiant purchased said section from said L. Y. Montgomery, as hereinbefore stated, and while said action was pending in said court, the said James, in order to entitle him to protect his interests and rights to have said water flow over his said land, and with full knowledge and consent of said L. Y. Montgomery, purchased from this affiant forty acres of said fractional section,- upon, over, and through which said canal is situated, and this affiant conveyed the said forty acres to said James, this affiant and L. Y. Montgomery, well knowing that said James wanted to and intended to defend said action.”
Thomas Poyser, in his affidavit, says: “That-this affiant was present on the Laguna de Tache grant, and heard the conversation between L. Y. Montgomery and the said William Johns, namely, on or about the twenty-first day of August, 1896, in the course of which the said L. Y. Montgomery proposed to sell *141and convey the said land back to the said William Johns, if the said William Johns would release and discharge said mortgage and cancel the debt secured thereby; that said Johns consented and agreed to said proposal, and that said Johns then and there informed the said L. Y. Montgomery that he intended, after repurchasing said land, to sell and convey some forty acres to Jefferson G. James for six hundred dollars, upon, over, and through which said canal is situated.” The only affidavits in reply on the part of the plaintiff were by its attorney and L. Y. Montgomery, one of the defendants. The affidavit of the plaintiff’s attorney in response to that portion of the affidavit of Graves, the appellant’s attorney, as to what occurred in open court, merely says: “That no statement was made in open court or otherwise at the time the complaint of Jefferson G. James was withdrawn, or at any time or at all, that was heard or understood by affiant.” And also that he did not know at the time that James was defending the action for the Montgomerys. The affidavit of L. Y. Montgomery admits the reconveyance of the said fractional section 4 to William Johns as stated, and also that at and before the execution and delivery of said deed it was understood and agreed that said Johns would convey forty acres of said land to J. G. James for the consideration of six hundred dollars. He does not deny that the mortgage held by Johns for four thousand dollars was satisfied of record and the debt secured thereby canceled; but claims that at the time of the reconveyance he had a verbal understanding with Johns that he, Johns, would convey the said land to affiant, or to affiant and his brother, upon demand therefor, and upon payment to him of three thousand dollars—four hundred dollars in cash at the time of said reconveyance, and a note and mortgage upon the land for the remainder, payable within a reasonable time. Nothing is stated in his affidavit as to anything having been done under such alleged verbal agreement or that he ever intends to do anything under it. He admits that the ditch or canal in question “runs through and over said section 4, and a portion thereof through and over the lands conveyed to the said James, and a portion thereof through and over the lands in which affiant retains title and interest as herein-before stated and specifically set forth.” That is the so-called *142verbal agreement, which may never be carried out, and which could not be enforced. He does not deny, anywhere, the conversations and agreements detailed in the affidavits of the appellant, his attorney, and William Johns and Thomas Poyser.
At the time the stipulation was filed the defendants had no title of record to the premises involved or interest in further defending the suit, and the appellant James was an interested party in defending such suit. Section 385 of the Code of Civil Procedure provides that, in case of any transfer of interest, the action may be continued in the name of the original party, or the court may allow the person to whom the transfer is made to be substituted in the action.
In the case of Walker v. Felt, 54 Cal. 386, the plaintiff, after having transferred his interest, through his attorney, dismissed the action. The court say: “The party who had transferred his interest divested himself of any power to control the action. He could not dismiss it because his successors had a right to have it continued. The validity of the order of dismissal in this case rests solely upon the consent of the original plaintiff. .... As he had no right to interfere with the action, the court, not being advised of that, should have vacated the order based upon it. The attorney who signed the stipulation as the attorney for the plaintiff did not assume to act as the attorney for his successor in interest, and states in his affidavit, “that he signed the stipulation because he and the nominal plaintiff had parted with all interest in the land, and did not wish to prosecute the action any further, and did not desire to become liable for costs.” The court, commenting upon this affidavit, says: “We cannot discover that this gave him any right to stipulate away the rights of his successors in interest. The attempt to do so should be defeated, if the court possesses the requisite power to defeat it. The act involves a flagrant breach of good faith, and that is a thing that justice abhors.....The court which made the order dismissing the action must have been imposed upon, and, after discovering the fraud and imposition, the order should have been promptly vacated.” In this case the nominal defendants signed the stipulation, and not an attorney, and they substantially give the same reason as given in the case cited, to wit, that they had no farther interest in the litigation.
*143In Plummer v. Brown, 64 Cal. 429, the defendant John A. Brown’s interest had been transferred pending the litigation to Martha Brown and C. E. Thom. The court say: “They certainly had acquired the right to represent him. The transfer of his interest to them entitled them to have the action continued in his name, or the court might allow them to be substituted for him. (Code Civ. Proc., sec. 385.) After transferring his entire interest in the subject of the controversy, the defendant was only nominally a party to the action. The real parties in interest were his grantees. The entry of his default affected them, not him. It is the duty of all courts to construe the provisions of the code ‘liberally with a view to effect its objects and to promote justice.’ ” In that case the motion was made under section 473 of the Code of Civil Procedure, and the court set aside the default entered against the original defendant upoir the motion of his successors in interest, which order was affirmed by this court.
In People v. Mullan, 65 Cal. 396, a motion was made by the Cucamonga Company, to which the land involved in the action had been conveyed, and a certificate therefor assigned by Mullan, to set aside a pretended service on Mullan, which motion was denied by the court below, and on appeal the order was reversed by this court. This court say: “We regard the corporation as in legal effect the assignee and legal representative of Mullan, and standing in his shoes. We think the motion was well made. (Code Civ. Proc., sec. 473; United States v. Patterson, 15 How. 12.) The company could have moved in the name of Mullan, and it has substantially done this. We' should be sacrificing substance to form to hold otherwise.”
It is contended on the part of respondent’s attorney that if the motion was made under section 473 of the Code of Civil Procedure, it was properly denied for want of an affidavit of merits. However, the attorney for appellant James files an affidavit of merits, and the appellant himself states facts disclosing merits. Besides, this contention on the part of respondent’s attorney is answered by the action of the court below in allowing the appellant to file, first, a complaint in intervention, and sub-, sequently through the nominal defendants allowing to he filed by the appellant’s attorney the last amended answer and cross-*144complaint. The court, therefore, at the time of granting such orders, must have considered that the appellant had a meu.jiious defense to the action.
But this motion is not based on section 473 of the Code of Civil Procedure, but upon the rights of a party succeeding to the interests of a litigant, pending the litigation, under section 385 of the Code of Civil Procedure. Further, the motion is not to set aside a default obtained “through his mistake, inadvertence, surprise, or excusable neglect,” but is to set aside a judgment entered upon a fraudulent stipulation.
It is too plain to be questioned that the nominal defendants at the time the stipulation was filed knew that the real party defendant was the appellant James, and that they had parted with what interest they might have had. As to them, therefore, it was clearly a fraud upon the appellant to sign the stipulation and have judgment entered thereon. “When a judgment or decree of any court, whether inferior or superior, has been obtained by fraud, the fraud is regarded as perpetrated upon the court as well as upon the injured party.....The equitable jurisdiction to cancel and set aside or to restrain judgments and decrees of any court obtained by a fraud practiced upon the court and the losing party, is well settled and familiar.” (2 Pomeroy's Equity Jurisprudence, 919. See, also, Baker v. O'Riordan, 65 Cal. 370.)
In Norton v. Atchison etc. Ry. Co., 97 Cal. 388; 33 Am. St. Rep. 198, the motion was made to quash the summons, and to set aside and vacate the default of the defendant, on the ground that the service was not such as authorized by law, and a fraud on defendant, and that the court had no jurisdiction to enter the default and judgment. It was contended in that case that the application could only be made under section 473 of the Code of Civil Procedure, based upon an affidavit of merits. This court say, in response to that contention: “The main provision of that section is that a court may relieve a party from the judgment taken against him Through his mistake, inadvertence, surprise, or excusable neglect,’ and it is quite clear that the provision just quoted has no application to the ground upon which the respondent moved in the ease at bar. Defendant here is not asking relief from its neglect or mistake or default of any *145character.....In the cases cited, the parties making application to set aside the .judgments confessed some neglect or misconduct from which they sought to be relieved, and thus come clearly within the provisions of said section, and, of course, were compelled to comply with the provisions of the section under the construction -which the court had given them.” The order of the court below setting aside the default was affirmed by this court in- Bank after full hearing.
But it is contended that the appellant only acquired a part of the former interest of the defendants in the premises, and not the entire interest. Even if this should be conceded, it does not help the respondent in the least. In Cerf v. Ashley, 6 Cal. 420, it is held: “The code allows, in case of a transfer of a part of the subject-matter, the transferee to be joined as plaintiff with the original plaintiff. In case of a transfer of interest, the action or proceeding may be continued in the name of the original party, or the court may allow the person to whom the transfer is made to be substituted in the action or proceeding. (Code Civ. Proc., sec. 385.) It would be too narrow a construction of this section to hold that it applies only where the transfer is of the entire interest.”
In Stewart v. Spaulding, 72 Cal. 264, one of the plaintiffs became insolvent, and his assignee in insolvency continued -to represent his interest, without substitution, in the name of the insolvent, and the court held that this -was proper—that the action could be continued in the name of the original party, or the one to whom the interest was transferred could be substituted. (California Cent. Ry. Co. v. Hooper, 76 Cal. 404.)
The nominal defendants in this case at the time of the stipulation were represented by an attorney of record who was the ap> torney of the appellant, and also was known by them to represent the interests of the appellant in the action. A party to an action may appear in his own person or by attorney, but he cannot do both. If he appears by attorney he must be heard through him, and it is indispensable to the decorum of the court and the due and orderly conduct of the cause that such attorney shall have the management and control of the action, or of the defense, and his acts go unquestioned by anyone except the party whom he represents. So long as he remains at*146torney of record, the court cannot recognize any other as having the management of the case. If the party whom he represents at any time becomes dissatisfied, his remedy is pointed out by law—to procure a change or substitution. Until this has been done the client cannot assume control of the case.
In Board of Commrs. v. Younger, 29 Cal. 149, 87 Am. Dec. 164, the court say: “While there is an attorney of record no stipulation as to the conduct or disposal of the action should be entertained by the court unless the same is signed or assented to by such attorney.....Such a rule is not only indispensable to the orderly conduct of a cause, but is likewise a safeguard to the client against the intrigues of his adversary.....To entirely ignore the attorney of record, and enter without his consent into secret negotiations with his client touching the management of his case, is unbecoming the dignity of the legal profession, and destructive of that courtesy which is due from one member to another.”
In Mott v. Foster, 45 Cal. 72, the court say: “The stipulation signed by the plaintiff in person goes for nothing. He had at the time an attorney of record, who as such had the exclusive management and control of the case.”
In Wylie v. Sierra Gold Co., 120 Cal. 486, the court say: “When a party appears and is represented by an attorney of record, he cannot assume control of the case, and, if he signs a stipulation dismissing the action, or extending time for any purpose, the stipulation will have no effect, and will be disregarded by the court.”
On the showing made in this case the court below should have promptly granted the motion to set aside the judgment entered Upon the stipulation of the nominal defendants.
Order denying the motion reversed.
Harrison, J., and Garoutte, J., concurred.