Tbe questions raised by tbe different demurrers to tbe complaint and tbe cross-complaints of tbe Beaumont Hotel Company and tbe subcontractors as lienors may be treated together, because tbe same subjects are involved in tbeir consideration and decision. In natural sequence, tbe question of tbe nature and extent of tbe liability of tbe sureties under tbe bonds given by tbem to tbe principal contractors to secure performance of tbe contracts for tbe construction of tbe hotel, and the nature of tbe action for tbe enforcement and foreclosure of tbe alleged liens, should be first considered.
1. Tbe complaint alleges that to secure tbe faithful performance of tbe contract of tbe Kirkmcm Oonstmaction Company with tbe Beaumont Hotel Company to furnish tbe material and perform tbe work therein specified for .the construction of tbe hotel, tbe construction company as principal, and tbe defendant National Surety Company as surety, on November 1, 1909, made a bond binding themselves to pay tbe hotel company tbe sum of $35,000, conditioned that if tbe construction company should duly perform tbe contract with tbe hotel company for furnishing tbe material and performing tbe labor agreed upon, and “shall duly and promptly pay and discharge all indebtedness that may be incurred in carrying out and completing said contract, and save said building and tbe Beaumont Hotel Company free and harmless from all mechanics’ liens and claims of liens, or other claim or expenses by reason thereof, then this obligation shall be void, otherwise to remain in full force and effect.” Tbe bond of tbe surety, J. H. M. Wigman, to secure tbe performance of tbe contract of Martin & Wigman contained provisions of like effect. Confessedly, both of tbe principal contractors failed to perform tbeir contracts. This failure imposes the obliga*10tion on tbe bondsmen to “pay and discharge all indebtedness that may be incurred in carrying out and completing said contract” and to save tbe hotel property and tbe hotel company “free and harmless from all mechanics’ liens and claims of liens,-or other claim or expenses by reason thereof.” This undertaking is in no sense modified or restricted by the terms of the construction contracts of the parties, wherein the construction company agrees, in consideration of sums agreed upon, to furnish all tbe material and labor embraced in the contracts, to pay for the same, and to furnish written vouchers showing such payment or waiver of claim or lien therefor, and if through default in these conditions any liability should be incurred by the hotel company, then the sureties were to indemnify and make whole the hotel company on account thereof. These stipulations of the contracts and bonds clearly mean and evince a purpose that the parties thereby intended that the sureties should secure.payment for the material and labor furnished by the contractors. Obviously, the parties understood that in the course of affairs such an obligation would cover the material and labor secured from third parties by the contractors. Under such circumstances, third parties furnishing labor and material obtain the benefit of such indemnity, and they can enforce their rights in all respects as if they had been parties to the contracts and bonds. The rights and liabilities of the principal contractors, the sureties, and the persons furnishing material and labor within the terms of the transactions covered by the construction contracts and bonds have on several occasions recently been considered in this court and need no further amplification here. See the following cases and the cases cited therein sustaining the light of such third persons to enforce the obligation against the bondsmen: United States G. Co. v. Gleason, 135 Wis. 539, 116 N. W. 238; R. Connor Co. v. Ætna, Ind. Co. 136 Wis. 13, 115 N. W. 811; Tweeddale v. Tweeddale, 116 Wis. 511, 93 N. W. 440; Johnston v. Charles Abresch Co. 123 Wis. *11130, 101 N. W. 395. Under the facts and circumstances of the case, the subcontractors who have unpaid claims for material and labor furnished in the construction of the hotel and embraced in the provisions of the construction contracts are entitled to liens therefor on the hotel property, and they are entitled to enforce the liability of the sureties upon their bonds for payment thereof by action against the sureties.
2. It is contended by the appellants that the action for the enforcement of mechanics’, laborers’, and materialmen’s liens is a remedy provided by statute, which prescribes the rules of pleading and the procedure therein, and that the regulations on these subjects in the lien statutes exclude any intention that such actions are to be governed by the established rules in equitable proceedings other than those specifically included in the statutes. This contention is based on the provisions prescribing what claimants may be made parties to the action (sec. 3321, Stats. 1898), what allegations of fact shall make a sufficient complaint (sec. 3322, Stats. 1898), what shall be embraced in the judgment for a sale of the premises and the distribution of the proceeds, and whether there shall be personal judgments in case of a deficiency or for want of establishing a lien on the property (sec. 3324 to sec. 3326, Stats. 1898). The contention that the right to a lien being created by a statute which prescribes the procedure to enforce it shows an intention that the remedy is to be restricted and limited to the statutory regulations provided, is not sustained. The statute (sec. 3323, Stats. 1898) by express provision declares that such an action shall be deemed equitable. This negatives the implication that it is to be restricted to the statutory procedure expressly provided. The statutory regulations concerning pleading and practice in the action to enforce the lien are to be treated as regulative of those parts of the equitable proceeding and do not exclude the right to apply equitable procedure in all other respects so far as the facts and circumstances of the case may require to adjudicate upon the rights *12of all parties thereto. The remedy for foreclosing the lien is equitable in its nature and characteristics, and makes the action inherently an action in equity. The nature of the relief to be granted is such as the courts of equity award and such as can be most readily administered under their procedure. That statutory regulation of the pleading and practice in lien suits does not provide a complete code of procedure, and that equitable rules unless modified by statute are applicable, is recognized in the following cases: Huse v. Washburn, 59 Wis. 414, 18 N. W. 341; Bartlett v. Clough, 94 Wis. 196, 68 N. W. 875; Willer v. Bergenthal, 50 Wis. 474, 7 N. W. 352; Charles Baumbach Co. v. Laube, 99 Wis. 171, 74 N. W. 96; Charles v. Godfrey, 125 Wis. 594, 104 N. W. 814. Had the statute simply declared that the action to foreclose a lien should be deemed equitable, there could be no claim but that an equitable procedure would apply and control in all respects. There is nothing in the provisions modifying the procedure in such action which is inconsistent with the procedure in equity cases in other respects. The statutory regulation of the remedy goes no farther than to modify or confirm the rules that equity employs in similar suits and in no way abrogates their application to the varying exigencies that may arise in lien actions. From this it necessarily follows that the rights of the parties in such actions are to be enforced according to equitable remedies and the provisions of the statutes for determining the ultimate rights of the parties who have filed claims for liens against the property, whether they are plaintiffs or defendants in the action.
3. We now approach the specific grounds of demurrer. The complaint and the cross-complaints of the lienors allege in substance and form that they are subcontractors, that the principal contractors have failed to pay them in the amounts stated for materials furnished and labor performed under the construction contracts, and that they claim liens on the hotel property for these amounts and that the bondsmen are liable; *13and they ask that the rights of all persons who have filed claims for liens on the premises, whether plaintiff or defendant, be ascertained, that the premises subject to the liens be sold to satisfy the liens, with costs, and, in case of deficiency, that they have personal judgment against the parties liable on the demands for which liens are claimed. The hotel com: pany in its cross-complaint alleges the making of the construction contracts, and the bonds to secure performance thereof, the terms and conditions of these agreements, the failure of performance and that large sums are due the lienors, and that it has large claims against the principal contractors and their sureties for work done and material furnished in carrying the construction of the hotel to completion as called for by the construction contracts, and that it has a claim for damages against them for their default in not providing the material and completing the work as specified in the construction contracts. The sureties and the principal contractors contend, under their demurrers to the complaint and to the cross-complaints of the lienors and of the hotel company, that there is a defect of parties plaintiff and defendant, that several causes of action have been improperly united, and that the complaint and the cross-complaints do not state facts sufficient to constitute a cause of action.
It is provided in sec. 3321, Stats. (1898), that any such lienor may foreclose his lien by action and that all such lien-ors may join as plaintiffs, and if any of them do not so join, or refuse, they may be made defendants; also, that all persons having a subsequent mortgage, judgment, or other lien, and all subsequent purchasers of the premises, may be made defendants, and, if the action is brought by a subcontractor, then the principal contractor may be made a defendant. These provisions embrace all the persons who are parties of record in this suit except the sureties. . The question is whether they are properly before the court as parties to the action. The relations of the sureties to the principal contractors, the sub*14contractors, and the hotel company, under the terms of the construction contracts and the bonds, have heretofore been considered, and they were held liable on their bonds to the hotel company and the lienors for any claims for material and labor needed to complete the construction of the hotel pursuant to the construction contracts on account of the principal contractors’ default, hence they are vitally and adversely interested in the claims presented by the pleadings in favor of the hotel company and the lienors. Under their bonds they are primarily liable for payment of the debts and the liens for material and work. Under the equitable rule declared by sec. 2603, Stats. (1898), “Any person may he made a defendant who has or claims an interest in the controversy adverse to the plaintiff, or who is a necessary party to a complete determination or settlement of the questions involved therein.” Since the bondsmen have an interest in the controversy adverse to the plaintiffs, they are interested in not being subjected to any liability for claims of the lienors in excess of what may he found justly due them, and they are necessary parties to the litigation to determine this liability on doubtful claims should any such be presented for allowance. The sureties being thus adversely interested in the questions litigated, it is appropriate for a ..court of equity, in order to make a complete determination of all the questions involved between the parties, to require their presence so as to enable it to award judgment against them for the payment and discharge of all claims and liens according to the rights established in the action, thus saving the hotel company harmless in the matter. The court having jurisdiction of the parties, no obstacle exists to the granting of the relief demanded in the complaint and the cross-complaints, if it be so related to the subject of the action as to bring it within equitable cognizance. The primary right sought to be enforced in this action is to subject the property of the hotel company to the payment of the *15lienors’ claims accruing for tbe improvement of tbis property. Tbe enforcement thereof necessarily involves tbe establishment and determination of the amount of tbe claims justly due from tbe principal contractors for tbe construction of tbe hotel, tbe enforcement of tbe liens therefor, and tbe payment of tbe debts. Tbe liability of the sureties to pay them is therefore a subject germane to tbe primary purpose and object of tbe action. Tbis liability is properly enforceable between all parties appearing as codefendants, under tbe provisions of sec. 2656a, Stats. (1898), which declares:
“A defendant . . . may have affirmative relief against a codefendant, or a codefendant and tbe plaintiff, or part of tbe plaintiffs, or a codéfendant and a person not a party, . . . upon bis being brought in; but in all such cases such relief must involve or in some manner affect tbe contract, transaction or property which is tbe subject matter of tbe action.”
Tbe relief here sought against tbe sureties and their principals manifestly is related to and connected with tbe cause of action of tbe complaint and tbe cross-complaints of tbe lienors, and hence it includes and affects “tbe contract, transaction or property which is tbe subject matter of tbe action.” Under tbe circumstances shown and under tbe provisions of tbe statutes, it is apparent that those who were made defendants in tbe action were properly before tbe court and that there was no misjoinder or defect of parties to tbe'action.
Tbe claim that tbe principal contractors, Martin & Wig-man, and their obligor have no interest in tbe liabilities arising out of tbe contract and tbe bond of tbe Kirhmcm Construction Compcmy and its obligor is not tenable, because tbe demands of all tbe parties are connected with and relate to tbe subject of enforcing liens against tbe premises of tbe hotel company and of obtaining tbe payment of tbe debts, or, as declared in sec. 2656a, Stats. (1898), they involve and affect “tbe contract, transaction or property which is tbe sub*16ject matter of tbe action.” In the case of Gager v. Marsden, 101 Wis. 598, 77 N. W. 922, tbis court states r
“In an equitable action many matters are often' adjudicated wbicb would form tbe subject of an independent action,, either at tbe suit of plaintiff against one or more of tbe defendants, or between different defendants, yet are properly brought before tbe court as germane to tbe subject of tbe action stated in tbe complaint.”
See, also, Carpenter v. Christianson, 120 Wis. 558, 98 N. W. 617; Level L. Co. v. Sivyer, 112 Wis. 442, 88 N. W. 317; Harrigan v. Gilchrist, 121 Wis. 127, 99 N. W. 909.
4. It is strenuously asserted in behalf of all tbe demurrants tbat several alleged causes of action bave been improperly united and tbat tbe complaint and cross-complaints do. not state facts sufficient to constitute a cause of action. Tbe joinder of different causes of action for relief in favor of a party to a lien suit, or in favor of different persons who are proper parties to tbe action, is justified and proper,, as we bave heretofore seen, if tbe relief sought involves, or in some manner affects, “the contract, transaction or properly wbicb is tbe subject matter of tbe action.” The grounds upon wbicb tbe subcontractors, tbe hotel company, tbe principal contractors, and their bondsmen are found to be proper parties to tbis action for foreclosure of liens on tbe hotel property show tbat tbe relief they seek to enforce involves rights related and germane to tbe matter of enforcing the liens against tbe hotel property and securing payment of tbe amounts due under tbe construction contracts, and involves tbe determination of tbe ultimate liabilities of tbe parties between themselves, on each side of tbe controversy, pertaining to tbe transaction of tbe construction of tbe hotel. Jurisdiction of tbe parties in tbe suit for these purposes carries with it tbe right to unite in the complaint or cross-complaints tbe different grounds or causes of action for relief, to enable tbe court to ■“determine tbe ultimate rights of tbe parties on each side, as *17between themselves, either on cross-complaint or equivalent pleadings or otherwise, and may grant to the defendant any affirmative relief to which he may be entitled.” See. 2883, Stats. (1898). The scope of this power is declaratory of the broad, equitable powers courts may employ in joining parties and subjects in one suit, to determine their ultimate rights within its jurisdiction. This'power is of peculiar applicability to lien foreclosure suits under the statutory provisions heretofore referred to and considered. The appellants claim and insist, however, that the causes of action alleged by the lienors against the principal contractors and their bondsmen for relief on the bonds, and by the hotel company against the Kirhmcm Construction Company and its surety for relief under the construction contract and the bond, are actions at law which cannot be litigated in this equity suit. A portion of the relief demanded by the hotel company is that, if the principal contractor default in paying what is due subcontractors for material and labor, then that the surety be required to pay such claims to save the hotel company harmless from liens against its property. This the surety contracted to do, and under this obligation the hotel company may enforce this primary liability of the surety to pay the debts of its principal. This right is within the equitable principle governing this duty between the surety and the hotel company, which in turn is liable to these lienors as a surety of the surety company, that the surety company bear the obligation which is about to be cast on the hotel company, which principle was applied in the ease of Dobie v. Fidelity & C. Co. 95 Wis. 540, 70 N. W. 482, and approved in Momsen v. Noyes, 105 Wis. 565, 81 N. W. 860. The trial court held that the hotel company’s claim for breach of contract by the KirTcmcm Construction Company was not related to the primary right sought to he enforced in this lien action. Failure of the construction company to furnish the material and do the work required of it has, it is alleged, resulted in damages to the *18Hotel company and in liens against its property. Tbe rights and liabilities arising from tbe construction and surety contracts, tbe hotel property, tbe question of tbe hotel company’s claim for unpaid lien debts, and its claims for damages for breach of tbe construction contract, which claims tbe company may retain and offset against any claim of tbe principal contractor or affirmatively enforce against tbe surety if tbe principal defaults in paying them, connect these inquiries sufficiently with tbe subject of tbe litigation to empower a court of equity to adjust and settle them between tbe parties to this action. Tbe trial and determination of these issues in this action are incidental to tbe enforcement of tbe rights of tbe lien claimants against tbe hotel property, which tbe owners have a right to protect by asking that all tbe liabilities of tbe parties be adjusted and that no more be allowed to lien claimants than they are upon investigation entitled to, and that tbe principal contractor and bis surety be compelled to pay such debts and save tbe hotel property harmless. Tbe bond is involved in tbe suit and tbe relief therein as to lienors, and as to the hotel company for default in construction, and this sufficiently connects tbe hotel company’s claim for damages for breach of tbe construction contract with tbe subject of tbe action to authorize tbe court to retain it in order to have a complete and final determination of tbe rights and liabilities of all tbe parties in any manner interested in these contracts and tbe property. We are persuaded that this bolding is within tbe principle of tbe decision in tbe following cases, which bold that a court may “lay bold of a subject matter, however large, made up of a single primary right, and all rights germane thereto, however numerous, or several such subject matters under certain circumstances, bring all parties directly interested before tbe court, with all parties necessary to be there for their due protection, and settle tbe entire controversy by a single decree:” Harrigan v. Gilchrist, 121 Wis. 127, 99 N. W. 909; Gager v. Marsden, 101 Wis. 598, *1977 N. W. 922; Carpenter v. Christianson, 120 Wis. 558, 98 N. W. 517; Herman v. Felthousen, 114 Wis. 423, 90 N. W. 432; Adkins v. Loucks, 107 Wis. 587, 83 N. W. 934; Level L. Co. v. Sivyer, 112 Wis. 442, 88 N. W. 317; Zinc C. Co. v. First Nat. Bank, 103 Wis. 125, 79 N. W. 229; St. Croix T. Co. v. Joseph, 142 Wis. 55, 124 N. W. 1049.
The claim that this course deprives the demurrants of the right to have these issues tried by a jury is not sustained. Under sec. 2843, Stats. (1898), actions for the recovery of money only, or of specific real or personal property, or for divorce on the ground of adultery must be tried by a jury, ilo such case is here presented. The court properly overruled the demurrers interposed by the defendants.
By the Gourt. — The orders appealed from are affirmed.