A court of this State having jurisdiction of the subject matter may exercise jurisdiction in rem or quasi in rem on the grounds stated in this section. A judgment in rem or quasi in rem may affect the interests of a defendant in a status, property or thing acted upon only if process has been served upon the defendant pursuant to Rule 4(k) of the Rules of Civil Procedure. Jurisdiction in rem or quasi in rem may be invoked in any of the following cases:
(1) When the subject of the action is real or personal property in this State and the defendant has or claims any lien or interest therein, or the relief demanded consists wholly or partially in excluding the defendant from any interest or lien therein. This subdivision shall apply whether any such defendant is known or unknown.
(2) When the action is to foreclose, redeem from or satisfy a deed of trust, mortgage, claim or lien upon real or personal property in this State.
(3) When the action is for a divorce or for annulment of marriage of a resident of this State.
(4) When the defendant has property within this State which has been attached or has a debtor within the State who has been garnished. Jurisdiction under this subdivision may be independent of or supplementary to jurisdiction acquired under subdivisions (1), (2) and (3) of this section.
(5) In any other action in which in rem or quasi in rem jurisdiction may be constitutionally exercised. (1967, c. 954, s. 2.)