Any person settled upon and occupying any portion of the public lands held by the state is not liable as a trespasser for improving or cultivating it in the ordinary course of husbandry, nor for taking and using timber or other materials necessary and proper to enable the person to do so, provided the timber and other materials are taken from land properly constituting a part of the "claim" or tract of land so settled upon and occupied by the person.
Iowa Code § 658.8