Such lien as against the owner of the property shall attach and take effect from the time the first item of material or labor is furnished upon the premises by the lien claimant, and shall be preferred to any mortgage or other encumbrance not then of record, unless the lien holder had actual notice thereof.
SDCL 44-9-7