
554 P.2d 1297 (1976)
89 N.M. 536
Turner W. BRANCH and Vicki Branch, his wife, Plaintiffs-Appellees,
v.
Gary A. MAYS and Etsco, Inc., a New Mexico Corporation, Defendants-Appellants.
No. 2060.
Court of Appeals of New Mexico.
September 7, 1976.
*1298 F.L. Nohl, Albuquerque, for defendants-appellants.
James A. Branch, Jr., Robert R. Fuentes, Branch & Branch, Albuquerque, for plaintiffs-appellees.

OPINION
SUTIN, Judge.
Defendant ETSCO, Inc. appeals an adverse judgment which awarded plaintiffs special damages in an action for slander of plaintiffs' fee simple title to property, and denied defendant recovery on its counterclaim for foreclosure of a materialman's lien. We reverse plaintiffs' judgment and affirm the denial of defendant's counterclaim.

A. Plaintiffs were not entitled to recover special damages.

Plaintiffs' claim was based on slander of title to plaintiffs' property by reason of defendant filing for record an invalid materialman's lien, which affected the marketability of plaintiffs' property. The complaint alleged general damages, not special damages. To state a claim for relief for slander of title to property, it is essential that special damages be alleged. Plaintiffs' complaint failed to state a claim for relief. Garver v. Public Service Company of New Mexico, 77 N.M. 262, 421 P.2d 788 (1966).
Defendant's first affirmative defense alleged that plaintiffs' complaint failed to state a claim upon which relief could be granted. This defense being meritorious, the trial court lacked jurisdiction to enter judgment on the complaint unless the omitted element of special damages was supplied by amendment of the complaint, or by litigation of the issue of special damages without objection by the opposing party. Canavan v. Canavan, 17 N.M. 503, 131 P. 493, Ann.Cas. 1915B 1064 (1913). The method of accomplishing this result is now described in Rule 15(b) of the Rules of Civil Procedure. If plaintiffs did not comply with this rule, the trial court lacked jurisdiction to enter judgment for plaintiffs. We hold that plaintiffs did not comply.
During trial, plaintiff Turner W. Branch began to testify on the issue of special damages which arose out of the lack of marketability of plaintiffs' property. Defendant objected because the complaint alleged general damages; that under Garver v. Public Service Company of New Mexico, supra, the complaint failed to state a cause of action. At the close of argument by both parties, the court ruled as follows:
I will rule this way, I stated earlier the pleadings on both sides would be amended to conform with the evidence presented to this Court. I think there is a cause of action, as has been stated in *1299 the Complaint, as to the marketability to the property and the Exhibit here you are attempting to introduce goes to that property and it will be admitted into evidence * * *. [Emphasis added].
Plaintiffs did not offer a trial amendment, either for the purpose of making admissible evidence of special damages, or to make the pleadings conform to proof of special damages. Neither did plaintiffs amend their complaint and allege special damages. Plaintiffs rested on their complaint.
Rule 15(b) may be divided into two parts. The first part applies where there is no objection to evidence introduced with respect to an issue not raised in the pleadings. Under this part, the pleading is deemed amended to conform to the proof. The first part is not applicable to this case because defendant objected to evidence on special damages.
The second part is applicable. It provides:
If evidence is objected to at the trial on the ground that it is not within the issues made by the pleadings, the court may allow the pleadings to be amended and shall do so freely when the presentation of the merits of the action will be subserved thereby and the objecting party fails to satisfy the court that the admission of such evidence would prejudice him in maintaining his action or defense upon the merits. * * * [Emphasis added].
What is meant by the phrase "the court may allow the pleadings to be amended and shall do so freely"? This phrase is not explicit in its meaning. What is the procedure under which "the court may allow the pleadings to be amended"? We interpret this phrase to mean that "the court may allow the pleadings to be amended" when the proponent seeks or offers an amendment. See, American Institute of Marketing Sys., Inc. v. Keith, 82 N.M. 699, 487 P.2d 127 (1971); Groff v. Circle K. Corporation, 86 N.M. 531, 525 P.2d 891 (Ct.App. 1974); McLean v. Paddock, 78 N.M. 234, 430 P.2d 392 (1967). Plaintiffs did not seek or offer an amendment to the complaint. The ruling of the court was "sua sponte". "Sua sponte" means "[o]f his own will or motion; voluntarily; without prompting or suggestion." Black's Law Dictionary 1592 (Rev. 4th ed. 1968).
A mention of the failure of a trial court to allow an amendment "sua sponte" appears in Matter of Valdez, 88 N.M. 338, 540 P.2d 818 (1975). This case involved the involuntary civil commitment of defendants Valdez and Garcia. Defendants claimed the trial court erred in not granting defendants a hearing to determine whether they would receive treatment consistent with their constitutional rights. The Court said:
This court disagrees with defendants' first contention on two grounds. First of all, defendants' pleadings contained no allegation as to the constitutional inadequacy of the treatment they received, but during trial counsel continually attempted to present evidence on this matter over the objections of the State. Such a situation is governed by Rule 15(b), Rules of Civil Procedure for the District Courts of the State of New Mexico, which states in pertinent part:
"When issues not raised by the pleadings are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings. Such amendment of the pleadings as may be necessary to cause them to conform to the evidence and to raise these issues may be made upon motion of any party at any time, * * *. If evidence is objected to at the trial on the ground that it is not within the issues made by the pleadings, the court may allow the pleadings to be amended * * *."
As can be clearly seen from the record, the State did not give its assent, express or implied, to trial of this issue, *1300 neither party made a motion for amendment of the pleadings, nor did the court allow any such amendment sua sponte.

Thus, this issue was not properly before the trial court. * * * [Emphasis added] [88 N.M. at 340, 540 P.2d at 820].
In support of this statement, the Court then quoted at length from McLean v. Paddock, supra. We reduce the quotation to the following:
"* * * No trial amendment was offered either for the purpose of making such evidence and any issue presented thereby admissible or to make the pleadings conform to the proof. Indeed, Paddocks do not assert that a trial amendment was either offered or permitted. The author, 3 Moore's Federal Practice, p. 996, in discussing Rule 15(b), identical with our rule 15(b) (§ 21-1-1(15)(b), N.M.S.A., 1953) permitting trial amendments, said `where evidence has been admitted over objection and the pleadings have not been amended, no amendment can be implied.' (Citation omitted.)" [Emphasis added by Court] [88 N.M. at 340, 540 P.2d at 820].
The phrase in the Court's opinion, "nor did the court allow any such amendment sua sponte", means that the court did not sua sponte "give permission", or "give leave" to defendants to amend. It did not mean "nor did the court `order' any such amendment sua sponte". A trial court does not have the power sua sponte to exercise its own jurisdiction of the subject matter by its own amendment of a party's pleadings. "In order that jurisdiction may be exercised, there must be a case legally before the court...." State v. Patten, 41 N.M. 395, 399, 69 P.2d 931, 933 (1937). In Canavan, supra, the Court said:
If a material element is omitted, no legal cause of action is stated, and no jurisdiction to render a judgment arises. A direct attack upon the judgment, therefore, must ordinarily be successful. * * * [17 N.M. at 508, 131 P. at 494].
* * * * * *
* * * [I]f, in any way, the sufficiency of the complaint had been questioned, and the plaintiff had still elected to stand upon it, a different question would be presented. [17 N.M. at 511, 131 P. at 495.]
The answer to the question is that the complaint must be dismissed. Titsworth Co. v. Analla, 25 N.M. 628, 186 P. 1079 (1920).
When defendant objected during trial that the complaint did not state a cause of action, it raised a jurisdictional question. The trial court had a duty to resolve this issue before it could proceed further. In Re Doe, III, 87 N.M. 170, 531 P.2d 218 (Ct.App. 1975). It did not do so. It tried and determined the issues in the case that were not before it. Holmes v. Faycus, 85 N.M. 740, 516 P.2d 1123 (Ct. App. 1973). Plaintiffs were not entitled to recover damages.

B. Defendant did not have a valid materialman's lien.

Defendant claimed it had a materialman's lien on plaintiffs' property. It claimed it had furnished plaintiffs a swimming pool heater to be used on plaintiffs' premises.
To establish a valid materialman's lien, the burden was on defendant to prove that the heater was actually used in, and became a part of, the structure, the swimming pool. Panhandle Pipe and Steel, Inc. v. Jesko, 80 N.M. 457, 457 P.2d 705 (1969). The defendant failed in its burden of proof.
Defendant expresses concern over the failure of the trial court to find that defendant's lien claim was properly prepared and filed in accordance with the materialmen's lien law. Sections 61-2-2 and 61-2-6, N.M.S.A. 1953 (2d Repl.Vol. 9, pt. 1). Defendant did prove these facts, but this proof did not establish the validity of the lien. "[M]aterials to be used in the construction", the words used in § 61-2-2 and in the lien claim form, has been interpreted to mean "materials * * * actually *1301 used" in the construction. Panhandle Pipe and Steel, Inc., supra [80 N.M. at 459, 457 P.2d 705]. The swimming pool heater was not actually used in, and did not become a part of, the swimming pool.
While it can be said that the language used in the statute is deceptive to businessmen who engage in furnishing materials "to be used" in construction, the solution to this deception must rest with the legislature. Under the facts of this case, the mere filing of a materialman's lien did not give defendant the right to foreclose the lien. The lien was invalid from its inception because it was filed after defendant knew that the swimming pool heater was not actually used, and it was not a part of the swimming pool.
Plaintiffs' judgment is reversed. The denial of defendant's counterclaim to foreclose its materialman's lien is affirmed. The costs of this appeal are to be divided equally between the parties.
IT IS SO ORDERED.
LOPEZ, J., concurs.
HERNANDEZ, J., concurring in part, dissenting in part.
HERNANDEZ, Judge (concurring in part, dissenting in part).
I concur with Part A of the opinion. I respectfully dissent from Part B on the ground that defendants had a valid materialman's lien on plaintiffs' property. As the opinion points out, the validity of a lien under § 61-2-2, N.M.S.A. 1953 (2d Repl.Vol. 9, pt. 1) is determined by the rule of Panhandle Pipe and Steel, Inc. v. Jesko, 80 N.M. 457, 459, 457 P.2d 705 (1969) that the materials furnished must actually have been installed on the premises in order for the lien to attach. Plaintiffs state in paragraph 3 of the complaint that the swimming pool heater was installed. Defendants also allege that the unit was installed (counterclaim and third-party complaint, paragraph 3). Plaintiffs never sought to amend their complaint. An unconditional admission in a pleading permits of no controversy and requires no proof. Rokita v. Germaine, 12 Misc.2d 84, 176 N.Y.S.2d 34 (1958). The trial court clearly erred in finding that the unit was never installed (Finding No. 4) and in concluding therefore that defendants never had a valid lien (Conclusion of law No. 1).
It should also be emphasized that the subsequent removal of materials, once they have been installed, does not affect the validity of the lien. Johnson v. Smith, 97 Cal. App. 752, 276 P. 146, 147 (Dist.Ct.App., 2d Dist., Calif., 1929).
