Plaintiffs brought this replevin action for recovery of a race car and other items. Defendant answered, denying wrongful possession, claiming a lien pursuant to K.S.A. 58-201 for work done, and seeking judicial enforcement by foreclosure of the lien. At the time of the filing of his answer, the defendant had possession of the car. Thereafter, during settlement negotiations, it was agreed that he would surrender possession to the plaintiffs pending judicial determination of the parties’ rights. Subsequent to surrendering possession under this agreement, the defendant failed to file a lien statement within forty-five days as provided by K.S.A. 58-201. Plaintiffs moved for summary judgment on the ground that the defendant had waived his lien by failing to so file. The trial court agreed and granted the motion as to the race car. The action was later settled as to the other items and final judgment entered. The defendant appeals.
The relevant statutes provide:
*26258-201. “Whenever any person at, or with the owner’s request or consent shall perform work, make repairs or improvements on any goods, personal property, chattels, horses, mules, wagons, buggies, automobiles, trucks, trailers, locomotives, railroad rolling stock, barges, aircraft, equipment of all kinds, including but not limited to construction equipment, vehicles of all kinds, and farm implements of whatsoever kind, a first and prior lien on said personal property is hereby created in favor of such person performing such work or making such repairs or improvements and said lien shall amount to the full amount and reasonable value of the services performed, and shall include the reasonable value of all material used in the performance of such services.
“If such property shall come into the lien claimant’s possession for the purpose of having the work, repairs or improvements made thereon, such lien shall be valid as long as the lien claimant retains possession of said property, and the claimant of said lien may retain the same after parting with the possession of said property by filing within forty-five (45) days in the office of the register of deeds, under oath, a statement of the items of the account and a description of the property on which the lien is claimed, with the name of the owner thereof, in the county where the work was performed and in the county of the residence of the owner, if such shall be known to the claimant.”
58-202. “Said lien may be enforced and foreclosed as security agreements are enforced under the provisions of the uniform commercial code.”
58-215. “The voluntary delivery to the owner or claimant of any personal property by any person claiming a lien thereon, as provided in this act, shall be held to be an abandonment of such lien, and such lien may also be waived by special contract.”
Defendant contends that by filing his answer, asserting his lien, and seeking judicial enforcement by foreclosure he complied with K.S.A. 58-201 and cannot be held to have waived his lien. He points to K.S.A. 58-202 which provides that liens may be enforced as security agreements under the Uniform Commercial Code. The code, at K.S.A. 1978 Supp. 84-9-501, provides:
“When a debtor is in default under a security agreement, a secured party has the rights and remedies provided in this part and except as limited by subsection (3) those provided in the security agreement. He may reduce his claim to judgment, foreclose or otherwise enforce the security interest by any available judicial procedure.” (Emphasis added.)
Defendant argues that the statute thus contemplates placing the matter into the hands of the court and that to require the filing of a lien statement after the matter is before the court would be “cumulative and worthless.”
Defendant argues that his answer was sufficient as a lien statement as contemplated by K.S.A. 58-201. This argument must be rejected. The record on appeal does not disclose that there was an agreement between the plaintiffs and defendant that the vol*263untary surrender of possession would not be a waiver of his lien rights under the subject statute. An artisan’s or repairman’s lien is purely statutory. The statute confers special privileges upon one class of persons over others, and persons claiming benefits or privileges thereunder must bring themselves clearly within its provisions. National Bond & Investment Co. v. Midwest Finance Co., 156 Kan. 531, Syl. ¶ 5, 134 P.2d 639 (1943). K.S.A. 58-201 requires that a lien statement be filed with the register of deeds within forty-five days after parting with possession. Filing an answer to a replevin petition and the subsequent voluntary relinquishment of possession of the subject matter of the lien without an agreement between the parties that possessory lien is not waived or destroyed by such voluntary relinquishment of possession does not constitute compliance with K.S.A. 58-201.
K.S.A. 58-202 does not provide a means for establishing or continuing a lien but rather for enforcing existing liens. Filing a lien statement after the matter is placed in the hands of the court is neither cumulative nor worthless insofar as it gives constructive notice of the lien to third parties, such as creditors and purchasers, who might otherwise have no notice of the repairman’s claim.
“A common-law lien or a statutory lien that is dependent on possession continues only so long as possession is voluntarily retained; it is extinguished when the lienor voluntarily parts therewith .... However, as between the parties a possessory lien is not necessarily waived or destroyed by parting with possession, if there is an intention to preserve the lien and the lienholder only conditionally parts with the property, as where by special agreement he allows the owner to take the property into his possession without prejudice to the lien. Nevertheless, the surrender of possession under such an agreement will destroy the lien as to third persons.” 51 Am. Jur. 2d, Liens § 42, p. 181.
This rule is consistent with our statutes.
We conclude that by failing to file a lien statement, the defendant waived his “first and prior” lien against plaintiffs and third parties, and therefore we determine that the judgment in favor of the plaintiffs should be affirmed. It is undisputed that the defendant surrendered possession of the race car pending judicial determination of the parties’ rights. Upon the voluntary relinquishment of the car, the parties could have agreed that the defendant’s lien would remain in existence as between the parties. However, where, as here, there is nothing in the record to disclose that the parties specifically agreed to the retention of the *264lien rights after a voluntary relinquishment, the lien ceased to exist without full compliance with the provisions of K.S.A. 58-201. As a result, we conclude that the lien was waived and destroyed when the defendant surrendered possession of the race car.
The judgment of the trial court is affirmed.