(a) Except as provided in (b) of this section, a person may not bring an action for the recovery of real property or for the recovery of the possession of it unless the action is commenced within 10 years. An action may not be maintained under this subsection for the recovery unless it appears that the plaintiff, an ancestor, a predecessor, or the grantor of the plaintiff was seized or possessed of the premises in question within 10 years before the commencement of the action.
(b) An action may be brought at any time by a person who was seized or possessed of the real property in question at some time before the commencement of the action or whose grantor or predecessor was seized or possessed of the real property in question at some time before commencement of the action, and whose ownership interest in the real property is recorded under AS 40.17, in order to
(1) quiet title to that real property; or
(2) eject a person from that real property.