A person or the lessee or agent of a person owning or operating a railroad in the state is liable for the value of or injury to a horse, mule, colt, cow, bull, calf, hog, sheep, or other domesticated animal killed or injured upon or near an unfenced track of a railroad in the state, whenever the death or injury is caused by a moving train, engine, or car upon a track.