#### The TRUSTEES OF MORTGAGE TRUST OF AMERICA, a California trust, Petitioner, v. The DISTRICT COURT IN AND FOR the COUNTY OF ROUTT and The Honorable John J. Wilkinson, one of the Judges thereof, Respondents.

No. 80SA146.

Supreme Court of Colorado, En Banc.

Dec. 8, 1980.

*311Sharp & Black, P. C., John L. C. Black, Richard T. Casson, Steamboat Springs, for petitioner.

Ratcliffe & Chamberlin, Allen T. Rat-cliffe, Jr., Steamboat Springs, for respondents.

ROVIRA, Justice.

The Trustees of Mortgage Trust of America (MTA), petitioner, filed this original proceeding pursuant to C.A.R. 21, seeking relief in the nature of mandamus. The petitioner asks that we order the respondent trial court to reverse a ruling granting the motion of Siegrist Construction Co. and W. R. Hall Transportation Construction Divisions (S-H) to file an amended complaint and to consolidate two mechanics’ lien foreclosure actions, Civil Action 5195 (case 5195) with Civil Action 5271 (case 5271).

We issued a rule to show cause, and now make the rule absolute.

The controversy arises out of two mechanics’ lien actions which were filed in the District Court in and for the County of Routt in 1975.

I.

*Case 5195*

In case 5195, S-H filed a complaint to foreclose its mechanic’s lien against Storm Meadows East Corporation (Storm Meadows) in March 1975. It did not name MTA, the holder of the first deed of trust on the property in dispute, as a defendant. On March 31, 1976, S-H filed an amended complaint naming as additional. defendants MTA and seven other parties and requested the trial court for leave to file the amended complaint and to consolidate case 5195 with case 5271.

By its order dated April 16,1976, without notice to the petitioner, who was a defendant in case 5271, the respondent trial court granted S-H leave to file its amended complaint and ordered consolidation with case 5271.

*Case 5271*

Case 5271 was commenced in May 1975 when Benedict Associates filed a complaint to foreclose its mechanic’s lien against Storm Meadows covering the same property involved in case 5195. MTA and the Public Trustee of Routt County were also named defendants. In November 1975, Anna Mae Hutchens was allowed to intervene over the objection of MTA.

After answers, cross-claims, and counterclaims had been filed, Benedict Associates negotiated a settlement of its claims; and on April 15, 1976, the court entered an order dismissing all claims of Benedict Associates with prejudice.

On April 16,1976, as noted in our discussion of case 5195, the trial court issued an order without notice to MTA granting leave to S-H to file an amended complaint and consolidating case 5195 with case 5271.

*312After further negotiations with the inter-venor Anna Mae Hutchens, a stipulation for settlement of all claims was entered into by the parties; and on September 7, 1976, the trial court entered an order approving the stipulation and dismissing all claims with prejudice.

A few days after the dismissal of the Hutchens claim, MTA moved to vacate the April 16, 1976, order allowing consolidation and to dismiss the amended complaint of S-H.

On February 23, 1977, the respondent trial court, recognizing that the motion of S-H to consolidate should have been served on MTA and that, as defendant, it should have been given the opportunity to be heard, confessed error and ordered that the April 16, 1976, order of consolidation “should be vacated and held for naught.”

On March 1, 1977, S-H again filed a motion to amend its complaint and to consolidate case 5195 with case 5271. After a hearing, the respondent trial court on October 5, 1979, ruled that: (1) the amended complaint of S-H, filed in March 1976, was in full force and effect; (2) the dismissal of the claims of Benedict Associates and Hutchens did not have the effect of dismissing case 5271 and “said action remains in full force and effect as to the remaining claims and defenses filed therein;” (3) the granting of S-H’s amended complaint did not prejudice petitioner, since petitioner had already been named as a defendant in case 5271; and (4) since the parties were properly before the court, although in two separate lawsuits, consolidation would be appropriate.

On November 30, 1979, the trial court denied MTA’s motion to amend its order of October 5. This court then granted MTA’s petition under C.A.R. 21(a) in order to review the court’s decision.

The question we consider in this original proceeding is whether the trial court exceeded its jurisdiction by ordering consolidation of a pending mechanic’s lien foreclosure action (case 5195) with another such action (case 5271) after all of the mechanics’ lien claimants in the latter case had already been dismissed with prejudice.1

II.

 The procedure established for the perfection and foreclosure of a mechanic’s lien is wholly statutory and was unknown at common law or equity. Article 22 of title 38, C.R.S.1973. *Grimm v. Yates,*58 Colo. 268, 145 P. 696 (1914); *Cornell v. Conine-Eaton Lumber Co.,*9 Colo.App. 225, 47 P. 912 (1897). *See G. Osborne, G. Nelson & D. Whitman, Real Estate Finance Law*§ 12.4 (1979). As remedial legislation, designed to benefit and protect a class of persons hired to improve or construct structures on the land of another, the mechanics’ lien statutes provide that an effective mechanic’s lien relates back in time to the “commencement of work” upon the construction project at issue, thus gaining a preference over other liens and interests in land which may have been recorded prior to the actual filing of the mechanic’s lien. Sections 38-22-101, 38-22-103, and 38-22-106, C.R.S.1973. But the remedial purpose, *313which justifies the creation of this special property right, cannot justify a failure by a mechanic’s lien claimant to follow the requisite procedures established by statute to make other lienholders parties to the enforcement and foreclosure of the lien. *Stark Lumber Co. v. Keystone Investment Co.,*92 Colo. 259, 20 P.2d 306 (1933). We find that the consolidation procedure followed in this case was not one authorized by statute and, therefore, failed as a basis for the court’s asserted jurisdiction over MTA.

Section 38-22-111(1), C.R.S.1973, provides that “when separate [mechanics’ lien foreclosure] actions are commenced, the court may consolidate them upon motion of any party in interest or upon its own motion.” 2 In this case, S-H did not move to consolidate ease 5195 with ease 5271 until all the mechanics’ lien claims in case 5271 had been dismissed with prejudice.3

More than two years before the court entered its consolidation order of October 5, 1979, MTA had negotiated final settlements in case 5271 with both mechanics’ lien claimants on behalf of all defendants. The district court issued orders on April 15, 1976, and September 7, 1976, dismissing these separate mechanics’ lien claims with prejudice. *See*C.R.C.P. 41(a)(2). We are not persuaded that any meaningful distinction can be drawn between the situation here and that found in *Columbia Savings and Loan Assoc. v. District Court,*186 Colo. 212, 526 P.2d 661 (1974), where we held that, upon dismissal of a mechanics’ lien foreclosure action, the former parties are no longer within the jurisdiction of the court for purposes of consolidating actions und§!r section 38-22-111(1), C.R.S.1973. We hold that the same principle applies here. Once all the mechanics’ lien claims were dismissed in case 5271, whatever action technically may have remained cannot be characterized as one for the enforcement of mechanics’ liens. No substantial question of law or fact was pending in case 5271 that was common to those present in case 5195. *See*C.R.C.P. 42(a).

The rule is made absolute.

1

. It is within the discretion of the district court to make a determination whether amendment of a complaint adding parties to a pending action is proper. See C.A.R. 21(d) and C.R.C.P. 15. In the ordinary mechanic’s lien case, the six-month limitations period set down in section 38-22-110, C.R.S.1973, applies to joinder of additional parties by amendment; and a statute of limitation defense, being affirmative in nature, must be raised by responsive pleading. C.R.C.P. 8(c). *McIntire & Quiros v. Westinghouse Credit Corp.,*40 Colo.App. 398, 576 P.2d 1026 (1978). The trial court in its order of October 5, 1979, granted MTA leave to respond to S-H’s amended complaint seeking to add MTA as a party. Our decision here does not affect S-H’s amended complaint in the case 5195, nor limit the response that MTA will make to the amended complaint.

However, it should be noted that mere amendment of pleadings cannot accomplish ends which are inconsistent with statutory procedures. *See*C.R.C.P. 81. *Rogers Concrete, Inc. v. Jude Contractors,*38 Colo.App. 26, 550 P.2d 892 (1976). Amendment was clearly not justified on the basis of consolidation alone. To the extent that this rationale underlay the trial court’s order, the court exceeded its jurisdiction; and accordingly, we have reversed its ruling. See Part II of this opinion, *infra.*

2

. The actions which are subject to consolidation are those which have been brought to enforce the property rights of “[a]ll persons having claims for liens, the statements of which have been filed as provided in this article Section 38-22-111(2), C.R.S.1973; *see*section 38-22-109, C.R.S.1973. This procedure, when properly followed, is intended to facilitate the orderly and fair adjudication of mechanics’ lien claims. Holders of other types of adverse property interests are, nonetheless, under no obligation to intervene in mechanics’ lien foreclosure actions. *Stark Lumber Co. v. Keystone Investment Co., supra.*

3

. On February 23, 1977, the district court held that its order of April 16, 1976, had been ineffective to consolidate these cases because of lack of notice to MTA. The court never consolidated these separate cases on its own motion. Consequently, we deal only with its order of consolidation entered on October 5, 1979, pursuant to S-H’s motion of March 1, 1977.