Baetch, J.
(after a statement of the case as above, delivered the opinion of the court):
Counsel for the appellant, among other things, insists that the court, under the facts of this case, did not exercise a sound discretion in denying the motion to set aside the judgment by default, and in refusing to permit the defendant to file his answer. Counsel for the respondent contend that the motion states no ground for setting aside the default. The motion itself does not seem to appear in the record filed in this court, and therefore we are unable to scrutinize its terms. The notice does appear, and it shows that the motion was made on certain affidavits and pleadings, and by affidavit it is shown that the entry of judgment by default was a surprise to the defendant, and that the application to set it aside was based on mistake and excusable neglect, which are statutory grounds for relief. It also appears that at the hearing of the motion all parties were properly represented. Evidence was introduced, the parties were heard, the matter submitted, taken under advisement, and finally decided, without, so far as shown by the record, any objection on the ground that the motion was defective, which ground, it seems, is urged for the first time in this court. Under the facts and circumstances disclosed by the record, this court must hold that the motion was sufficient.
Was, then, the overruling of the motion such an abuse of discretion, on the part of the court, as to render its action in the premises erroneous and prejudicial to the rights of the defendant? It is clearly shown that during all the proceedings in the suit by the bank the defendant was absent from the state on business -affairs — was in the state of California, and much of the time in a remote part *206■of that state. Immediately upon being sued, he directed the employment of competent attorneys, which was done, -and then, feeling assured that the proper pleadings would be filed in his behalf and his rights protected, he continued in the pursuit of his business, and, but for the unfortunate circumstances of his failure to receive the letters of his attorneys, written him while he was absent from San Francisco, and his consequent failure to answer, resulting in the withdrawal of his attorneys, without notice to him, from the case, the judgment by •default would in all probability never have been entered, .fop, doubtless, upon the overruling of the demurrer, other steps would have been taken to save his rights. This must be inferred from the character of the answer and ■cross complaint tendered to be filed on the hearing of the motion. It will be noticed that the complaint alleges right in the plaintiff to sell the collateral security upon •default in the payment of the $4,000 note, while the answer tendered denies such right, and, in the cross complaint, sets up a distinct agreement whereby, in case of .such default, it became the duty of the plaintiff to foreclose the mortgage, as provided by law, and out of the ■proceeds of sale of the mortgaged property pay its own ■claims arising out of the $4,000 note, and turn the balance over to the defendant. This raises a material issue, and, if true, will make a good defense. Conspiracy and collusion of the bank officials with the mortgagors are also set up with considerable detail. The defense indicated is clearly meritorious, and, with a record replete with cir■cumstances indicating that the purpose and intention was to defend the action on its merits, would it be reasonable or justifiable to infer that the defendant knowingly and intentionally neglected his case? This, too, in the face of the fact that immediately upon his hearing of the judg*207ment by default be telegraphed another attorney to at once take steps to secure permission to answer to the merits. If in such a case as is presented in this record, a court of justice can grant no relief, then it would seem difficult to conceive of a case where a court would be justified in granting relief from a judgment by default. Surely, it cannot be said that a person liable to be sued leaves his state at his peril, even when he has employed able counsel to care for his interests, lest perchance a judgment be taken by default which will leave him without remedy, regardless of any defense he may have. Such is not the law, and courts do not favor judgments by default. The policy of the law is that every man shall have his day in court before judgment shall be entered against him, and where a judgment by default has been entered, and within the proper time a good defense to the action in which the judgment was rendered is made to appear,- and it be shown that the default was entered through excusable neglect or mistake, the default will be vacated, and the judgment set aside to permit a trial on the merits. It is true that ordinarily the setting aside of a judgment by default rests within the sound legal discretion of the court, and the appellate court will not interfere, but where, as in this case, it is made clearly to appear that there was such an abuse of discretion, through inadvertence or otherwise, as to render the action erroneous and unlawful, the appellate court will control such discretion, and set aside the illegal action. Such discretion does not confer upon the court an arbitrary power beyond that of review. It is an impartial legal discretion, which cannot be employed to the injury of any subject, but must be exercised fairly, reasonably, and in accordance with the established principles of law. The power of the court to set aside judgments by default is recognized and con*208ferred in section 3005, E. S. Utah, and should be liberally exercised, for the purpose of directing proceedings and trying canses upon their substantial merits; and where the circumstances which led to the default are such as to cause the court to hesitate, it is better to resolve the doubt in favor of the application, so that a trial may be secured on the merits.
In Bailey v. Taafe, 29 Cal. 423, it was said: “The discretion intended, however, is not a capricious or arbitrary discretion, but an impartial discretion, guided and controlled in its exercise by fixed legal principles. It is not a mental discretion, to be exercised ex gratia, but a legal discretion, to be exercised in conformity with the spirit of the law, and in a manner to subserve, and not to impede or defeat, the ends of substantial justice.” 1 Freem. Judgm. §§ 106, 114; 3 Estee, Pl. & Prac. § 4802; Fulweiler v. Mining Co., 83 Cal. 126; Wolff v. Railway, 89 Cal. 332; Thomas v. Morris, 8 Utah 284; Schnitzler v. Bank, (Kan. App.) 42 Pac. 496; Buell v. Emerich, 85 Cal. 116; Johnson v. Eldred, 13 Wis. 639; Machine Co. v. Marchant, 11 Utah 68; Roland v. Kreyenhagen, 18 Cal. 455; Woodward v. Backus, 20 Cal. 138.
No general rule can be laid down respecting the discretion to be exercised in setting aside or refusing to set aside a judgment by default. So it would be impossible to state what degree of negligence would justify the court in refusing relief in all such cases. Each case must necessarily depend upon its own peculiar facts and circumstances, but the discretion should always be so exercised as to promote the ends of justice. In the case at bar the facts and circumstances show that it was an unavoidable misfortune to the defendant that he did not know that no attorney was representing him in the proceedings which led to the entry of judgment against him until after the *209entry had been made. We are therefore of the opinion that the court erred in refusing to vacate the default and set aside the judgment, and in refusing to permit the defendant to plead to the merits. Having reached this conclusion, we do not think it necessary to discuss the question respecting the service of summons; and the questions respecting ambiguity and uncertainty in the complaint, raised specially by demurrer, so far as they may be well taken, can be obviated by amendment. The case is reversed, and the cause remanded, with direction to the court below to set aside the default and judgment, and permit the defendant to file his answer and cross complaint, and allow either or both parties to amend their pleadings if they so desire. Costs to abide the result of the action, in the discretion of the court.
Zane, C. J., and Miner, J., concur.