Every railroad company or corporation operating any steam or electric railroad in this state shall erect and maintain lawful fences, not less than four feet (4') high, on each side of its road, where the same passes through or along inclosed or adjoining cultivated fields or inclosed lands, with proper and necessary openings and gates therein and farm crossings; and also construct and maintain cattle guards suitable and sufficient to prevent horses, cattle, mules or other animals from getting on such railroads, at all highway crossings where such railroad is fenced up to such highway crossing: provided, however, that in lieu of the necessary openings and gates therein at farm crossings, cattle guards suitable and sufficient to prevent horses, cattle, mules or other animals from getting on such railroads may be installed at the expense of the adjoining landowner or landowners.
Until such fences, openings, gates, farm crossings and cattle guards shall be duly and properly made, installed and maintained, such railroad company or corporation shall be liable in a civil action to any and all person or persons who may sustain any loss, injury or damage by the wounding, maiming or killing of any horse, mare, gelding, filly, jack, jenny or mule, or any cow, heifer, bull, ox, steer or calf, or any other domestic animal which shall be done by such railroad company or corporation, or its agents or servants, in the operation and management of engines, cars, or other rolling stock, upon or over such railroad, whether such person or persons operating or in charge of such engine, cars or other rolling stock were guilty of negligence or not; and such railroad company or corporation shall also be liable in a civil action to any and all persons who may sustain any loss, injury or damage by the wounding, maiming or killing of any horse, mare, gelding, filly, jack, jenny or mule, or any cow, heifer, bull, ox, steer or calf, or any other domestic animal which shall be done by such railroad company or corporation, or its agents or servants in the operation or management of engines, cars, or other rolling stock upon or over such railroad, if any such animal or animals escape from adjoining lands and come upon the right of way or railroad tracks of such railroad company or corporation, occasioned by the failure of such railroad company or corporation to construct and maintain such fences, gates, farm crossings or cattle guards, whether the person or persons operating or in charge of such engine, cars or other rolling stock were guilty of negligence or not; but after such fences, gates, farm crossings and cattle guards shall have been duly made, installed and maintained, such railroad company or corporation shall not be liable for any such damages, unless negligently or wilfully done, and in all actions for the recovery of damages under this section, proof of the wounding, maiming or killing of such animal or animals by such railroad company or corporation, shall be prima facie evidence of negligence or wilfullness on the part of such railroad company or corporation.
If any railroad company or corporation, aforesaid, fail, neglect or refuse for and during a period of three (3) months after the completion of its road through or along the fields or enclosures hereinbefore mentioned, to erect, install and maintain any fences, openings, gates, farm crossings, or cattle guards as herein required, after having received not less than thirty (30) days' notice requiring them to erect, install and maintain such fences, openings, gates, farm crossings or cattle guards, then the owner of such field or enclosure may erect and maintain such fences, openings, gates, farm crossings and cattle guards, and shall thereupon have a right to recover from such railroad or corporation, the full value of the work so done, by a civil action in any court of competent jurisdiction.
Idaho Code § 62-406