(a) Except as provided in (c) of this section, an encumbrance which is properly recorded shall be preferred to a lien created under AS 34.35.050 - 34.35.120 unless the claim of lien under AS 34.35.070 or notice of right to lien under AS 34.35.064 has been recorded before the encumbrance. The preference granted for a prior mortgage or deed of trust under this section applies without regard to when the sums are disbursed or whether the disbursements are required under the terms of a loan agreement.
(b) [Repealed, Sec. 19 ch 175 SLA 1978].
(c) A lien created by AS 34.35.050 - 34.35.120 in favor of an individual actually performing labor upon a building or other improvement in its original construction or of a trustee of an employee benefit trust for those individuals is preferred to a prior encumbrance upon the land on which the building or other improvement is constructed.
(d) In enforcing the lien, the building or other improvement may be sold separately from the land. When sold separately, the purchaser may remove the building or other improvement within a reasonable time after the sale, not to exceed 30 days, upon the payment to the owner of the land of a reasonable rent for its use from the date of its purchase to the time of removal. If removal is prevented by legal proceedings, the 30 days does not begin to run until the final determination of the proceedings in the court of first resort, or in the appellate court if appeal is taken.