(a) Issuance. When a judgment or order is for the delivery of possession of real property, the judgment or order shall direct the clerk to issue a writ of possession. The clerk must issue the writ immediately and deliver it to the sheriff for execution.
(b) Third-Party Claims. If a person other than the party against whom the writ of possession is issued is in possession of the property, that person may retain possession of the property by filing with the sheriff an affidavit that the person is entitled to possession of the property, specifying the nature of the claim. The sheriff must then desist from enforcing the writ and must serve a copy of the affidavit on the party causing issuance of the writ of possession. The party causing issuance of the writ may apply to the court for an order directing the sheriff to complete execution of the writ. The court will determine the right of possession in the property and may order the sheriff to continue to execute the writ or may stay execution of the writ, if appropriate.