If a condemnor in a condemnation proceeding has taken possession of property pending litigation and the court finally decides that the condemnor does not have the right to condemn the property, the court shall order the condemnor to surrender possession of the property and issue a writ of possession to the property owner.
Tex. Prop. Code § 21.062