delivered the opinion of the court.
There are two questions suggested by the defendant upon this record for our determination. These will be examined in the order discussed. The first is, that the act of 1887, in relation to killing stock upon or near any unfenced track of any railroad, and found in Hill’s Code, as sections 4044 to 4049, inclusive, is unconstitutional. Section 4044 provides as follows: “Any person, * * * or corporation, * * * owning or operating any railroad within the State of Oregon shall be liable for the value of any horses * * * killed * * * upon or near any unfenced track of any railroad in this State whenever such killing or injury is caused by any moving train or engine or cars upon such track.” Section 4045 is as follows: “No railroad shall be deemed fenced within the meaning of this act unless such track is guarded against the entrance thereon of any such live stock on either side *321of said track, and not more than one hundred feet distant therefrom; provided, that whatever is a lawful fence under the laws of this State in the county where such killing or injury shall occur, and no other, under the laws of this State shall be deemed and held a lawful fence under this act; and provided further, that complete natural defenses against the entrance of such stock upon said track, such as natural walls or deep ditches, shall be deemed and held to be a fence under this act, when the same, in connection with other and ordinary lawful fences, form a contiguous guard and defense against the entrance of such live stock ' upon the track. ” It is claimed by counsel for the defendant that these sections are unconstitutional, for the reason that they are in conflict with the fourteenth amendment of the constitution of the United States (1), in that they deprive the defendant of its property without due process of law, and (2) in that they deny to the defendant the equal protection of the laws. As corporations are persons within the meaning of the clause in question, they are entitled to invoke the benefit of its provisions. Santa Clara Co. v. Railroad Co., 118 U. S. 394, 396. The defendant then is within its protection. The alleged conflict of these sections, or the act of 1887, with the fourteenth amendment, ordaining that no State shall deprive any person of his property without due process of law, nor deny to any person within its jurisdiction the equal protection of the laws, is supposed to lie in discriminating against the defendant by imposing a liability where no duty is required by law, or without any act of negligence on its part.. The contention is, that the act of 1887 imposes no duty upon the defendant to fence its track, yet it declares that the company shall make reparation for the killing of stock in the prosecution of its lawful business, without any fault or negligence on its part, or the violation of any duty imposed by law. As the defendant has the lawful right in a lawful way to run its trains, in order to hold it liable’ for the value of stock killed caused by the running of its. trains, there must be some violation of a duty imposed by law, or some act of *322negligence on its part. And, it would follow, unless the act imposes some duty, the violation of which renders the defendant liable, it would be open to the objection that it subjects the defendant and its business to a liability where no wrong has been committed, or duty unperformed, thereby depriving it of its property and the equal protection of the law afforded to others.
That the legislature, in the exercise of the police power of the State, may require all railroads to fence their track, and for neglect or failure to perform this duty, render them liable for whatever injury is done, or for double the value of the stock killed, and that such legislation is not obnoxious to the clause of the constitution in question, has been frequently decided and cannot be questioned. The danger attending the running of steam railway cars and liability to serious injury, or loss of life of its passengers by collision with animals straying upon its track where allowed to roam at large, makes it a requirement of duty to exercise the utmost care, and to take every precaution to keep its track clear, so as to prevent accidents from such collisions. How can this be better done, and the track kept comparatively secure from stock going upon it than by requiring the railroad company to fence its track, and in default thereof to hold it liable for the value of the stock killed by such collision, when the plaintiff is not contributorily negligent? Such a precaution, where stock is allowed to run at large, is a police regulation, and, as a security against the loss of life and property in the operation of dangerous machinery, is based upon the same principle and finds its authority in the same power which regulates the storage of gunpowder, or other dangerous explosives. This being so, the legislature may require railroad companies to enclose their tracks with fences and provide that they may be held liable for all stock killed caused by their neglect to maintain such fences; and if the act in question has imposed this duty on the defendant and attached a liability for its neglect, it is a valid exercise of the police power, and not *323subject to tbe constitutional objection urged. The real inquiry then is: Does the act of 1887, as found in the sections, supra, inclusive, undertake to impose any duty upon railroad companies to fence the line of their track, and for failure to discharge this obligation render them liable for the value of the stock killed? While the act does not declare the duty of the defendant railroad com pany to fence its track in express terms, it is sufficient, and forms part of the statute, if it makes it the duty of the defendant to do so by implication. “An implication,” said Folger, J., ‘ ‘is an inference of something not directly declared, but arising from what is admitted or expressed. Thus, when a statute, looking beyond the question of revenue for the public health or morals, inflicts a pen alty for doing an act, though that act be not in terms prohibited, yet is unlawful, for the penalty implies a prohibition. Griffith v. Wells, 3 Denio, 226. And the principle is, that, as the law will not punish an act which it is lawful to do, when it does punish it the act must of necessary implication be unlawful,” Matter of City of Buffalo, 68 N. Y. 173. So a statute which prescribes, as a precautionary measure, what shall be deemed a sufficient fence to protect a railroad track from the entrance of live stock, and declares an absolute liability for the killing of stock for the failure to fence, or for killing stock on an unfenced track except for misconduct, or contributory negligence, imposes, by implication, the duty' to fence as much as if such duty was expressly declared. A duty which is implied from what is expressed in a statute forms a part of it and is as obligatory as if directly enjoined and declared. Section 4044 makes the defendant, as a railway corporation, liable for the value of stock killed on or near any “unfenced track,” and section 4045 prescribes what shall be deemed a sufficient fence to protect the railway track from the entrance thereon of live stock, and section 4048 provides, in substance, that in every action for the value of any stock mentioned in section 4044 and killed on an unfenced track, proof of such killing shall be deemed and held con *324elusive evidence of negligence on the part of the company, except when the owner is guilty of contributory negligence, or misconduct contributing to the injury. The fence defined in section 4045 was intended to guard the railroad track “against the entrance thereon” óf live stock, as a precautionary measure to avoid liability to accidents, and when erected and maintained as prescribed, obviates the liability created by section 4044 by converting the “unfenced” into a fenced track.
There is no liability for the killing of stock, except where there is a failure to fence, or on an “unfenced track,” and it is for the omission of an “unfenced track,” or the failure to fence it, that creates the liability, except for misconduct or contributory negligence. As then it is only “unfenced tracks” to which the liability attaches when the owner is not guilty of contributory negligence, or misconduct, contributing to his injury, it is the failure of the defendant to fence its track, or the negligence in allowing it to be exposed as ‘ ‘an unfenced track” for the entrance of live stock, that renders it liable for the value of such stock when killed by a collision with its trains. The statute declares what kind of fence will be deemed sufficient to guard the track from stock going upon it, and, by implication, if fenced as prescribed, will avoid the liability declared as to “unfenced tracks”; that is, if the defendant railroad company will erect and maintain the fence prescribed by the statute along the line of its track, it ceases to be liable under the preceding section. It does not make the company absolutely liable for the stock killed on its track, but the liability attaches only when the road is unfenced, — when the precautionary measure prescribed by the statute to avoid accidents and collision with such stock is neglected and unperformed,— and the owner is not contributorily negligent or guilty of misconduct. The duty, then, to fence is plainly implied, and the liability is imposed for the failure to do it. Negligence is the failure to perform some act required by law, or the doing of an act in an improper manner. When *325the statute prescribes the fence, and declares stock killed on “an unfenced track” shall be conclusive evidence of negligence, by implication, it makes it the duty of the company to fence its track, because one cannot be deemed guilty of negligence unless a duty has gone unperformed or neglected. “A statute,” it is said, “often speaks as plainly by inference and by means of the purpose which underlies the enactment as in any other manner. ” U S. v. O’Conner, 31 Fed. Rep. 451. And so here, the duty to fence is as plainly inferred as if it had been declared in express language, and the liability only attaches for disregarding it, and leaving the track unfenced.
In Iowa the statute is as follows: “Any corporation operating a railway that fails to fence the same against live stock running at large at all points where such right to fence exists, shall be liable to the owner of such stock injured or billed by reason of the want of such fence for the value of the property or damage caused, unless the same was occasioned by the wilful act of the owner or his agent; and in order for the owner to recover, it shall only be necessary for the owner to prove, etc., and if such corporation neglects to pay, etc., such owner shall be entitled to recover double the value of the stock killed or damages caused thereby.” Code of Iowa, 1289. In Welsh v. Railroad Co., 53 Iowa, 634, the action was to recover double the value of a horse alleged to have been killed by one of the defendant’s engines at a point where it had the right to fence its road, and the court below instructed the jury that it was the duty of a railroad company to fence its road against live stock running at large at all points where such right to fence exists; and it was objected to this instruction that no such duty exists, and the court say: “While it is true the statute does not impose an abstract duty or obligation upon railway companies to fence their roads, yet, as to live stock running at large, a failure to fence fixes an absolute liability for injuries occurring in the operation of the road, by reason of the want of such fence. The corporation owes a duty to the *326owners of live stock running at large, either to fence its road or pay for injuries resulting from the neglect to fence.” And in Bennett v. Railway Co., 61 Iowa, 356, the court say: “We think the only proper construction of the statute is, that in order to escape liability, the company must not only'fence laut keep the road sufficiently fenced; and this has been more than once ruled.” This statute does not, in express terms, declare the duty of the railway companies to fence their tracks, but it is implied as a reasonable means to keep its track clear and insure safety in the movement of its trains.
In Railroad Co. v. Beckwith, 129 U. S. 26, the validity of the statute was assailed, as here,- as being in conflict with the first "section of the fourteenth amendment of the constitution of the United States, and it was held not subject to that objection, but a valid and reasonable exercise of the poiice power of the State for the protection of its citizens. Mr. Justice Field, in delivering the opinion of the court, among other things, said: “The tremendous force brought hito action in running railway cars renders it absolutely essential that every precaution should be taken against accident by collision, not only with other trains but with animals. A collision with animals may be attended with more serious injury than their destruction; it may derail the cars and cause the death or serious injury of passengers. Where these companies have the right to fence their tracks and thus secure their roads from cattle going upon them, it would seem to be a wise precaution on their part to put up such guards against accidents at places where cattle are allowed to roam at large. The statute of Iowa, in fixing an absolute liability upon them for injuries to cattle committed in the operation of their roads by reason of the want of such guards, would seem to treat this precaution as a duty. * * * But the obligation of the defendant railway company to use reasonable means to keep its track clear, so as to insure safety in the movements of its trains, is plainly implied in the statute of Iowa, which also indicates that the putting up of such *327fences would be such reasonable means of safety.” And again: “As it is thus the duty of tlie railway company to keep its track free from animals, its neglect to do so, by adopting the most reasonable means for that purpose,— the fencing of its roadway, as indicated by the statute of Iowa, — justly subjects it, as already stated, to punitive damages, where injuries are committed by reason of such neglect.” And so here, the duty of the defendant railway company to use reasonable means to keep its track dear by fencing it as indicated by the statute, and thereby avoid the liability to accidents from stock running at large and straying upon its track, is plainly implied as the proper means to secure safety, and its neglect to do so by leaving its track unfenced, justly subjects it to the liability fixed for the injury committed. Nor is the case of Bellenberg v. Railroad Co., 8 Mont. 276, relied upon by appellant’s counsel, in conflict with the view suggested. There the statute was different, and in effect declared that any railroad corporation shall make reparation to the owner of any stock for any injury inflicted in the prosecution of its lawful business without any fault or negligence on its part. It was as follows: ‘ ‘Every railroad corporation or company operating any line of railroad or railway, or any branch thereof, within the limits of this Territory, which shall damage or kill any horse * * * by running any engine or engines, car or cars, over or against any such animal, shall be liable to the owner of such animal for the damages sustained by such owner by reason thereof.” As there was “no law,” as the court say, “in the Territory which compels railroads to fence their lands,” and as the statute in question did not make it their duty, either expressly or impliedly, to fence its track, it required the court, to sustain such statute, ‘.‘to lay down the doctrine that the legislature can inflict a penalty upon one who is doing a lawful act in a lawful manner,” which the court refused to do.
The liability of railway corporations, under this statute, did not attach for the violation of any law, or the neglect to perform any duty, or for the want of proper care in *328running its trains, but they were mulct in damages without any wrong or fault, wben engaged in the lawful prosecution of their business, and when no one else was so liable under such circumstances. The same may be said of Railway Co. v. Lackey, 78 Ill. 55, and Zeigler v. Railroad Co., 58 Ala. 595; Jensen v. Railroad Co., Utah S. C. 1889, which were under like statutes. Nor is Hindman v. Railroad Co., 17 Or. 619, in conflict with the construction we have given to our statute. It is true that Thayer, C. J., in the course of his opinion, said that ‘ ‘fencing the railroad track is not imposed upon the company as a duty,” that is, not directly or expressly imposed as a duty; “but,” he observes, “it is the fact” — that is, the killing of stock on an unfenced track by a moving train — “which of itself establishes conclusively that the company is guilty of negligence. ” This could not be so unless some duty was neglected, and it must therefore be implied. The theory of the argument is only consonant with this hypothesis. Its meaning plainly is, that when stock are killed at a place where the duty to fence has been neglected by the company, that an absolute liability attaches — “it is this fact which of itself establishes conclusively that the company is guilty of negligence. ” The result is, that we think that the statute in question is not obnoxious to the constitutional objection suggested, but that in devolving a liability for the violation of the duty to fence, it is a valid and reasonable exercise óf the police power of the State, intended to guard the track against live stock, so as to insure the safety of the lives of passengers and property involved in the running of its trains, as well as to prevent the destruction or loss of such property by collision with moving trains or cars.
The next objection embraces exceptions to instructions given, and instructions asked and refused. These instruc tions are as follows: “Under the laws of this State, in an action like this, proof of the killing of the horse by the defendant’s moving engine or cars, and that the place where the horse entered on the track was not fenced, is conclusive proof of negligence on the part of the defendant *329corporation, unless the point where the horse entered and was killed was a county road or public highway.
1 ‘3. In this case, if you find from the testimony that the horse entered upon the track of the defendant at a point some distance from where he was struck and killed, and some distance from any county road or public crossing, and that soon after he entered thereon the defendant’s train came along, and that the horse ran along upon said track where it was unfenced in front of said train until he was struck and killed by it, and that he entered upon said track from a common unfenced range, then you should find a verdict for the plaintiff for the full value of said horse at the time he was killed.
“4. I charge you that if the horse entered upon the defendant’s unfenced track from a common unfenced range, at a point where there was no public road or public crossing, and being on said track at said point ran from there along and upon said unfenced track in front of the defendant’s train at a point at or near a public road and was there struck by the defendant’s engine or cars and was killed, then the defendant is liable for the value of said horse. And the fact that he may have been struck in the edge of the public road affords no defense, provided he got on the track and ran along it and was struck as aforesaid.”
The court also charged to the effect that the section of the Code referred to did not apply to public crossings, etc., and that the owners or operators of railroads were not liable for killing stock on public highways unless guilty of negligence, or a want of ordinary care, and that if they found from the evidence that the plaintiff’s stallion was upon the track at a point where a public highway crosses the same and was there struck and killed by a moving train, the fact that the track was unfenced at that point is no evidence of negligence.
The defendant claims error in the refusal of fue court to give the following instruction: “The mere fact that plaintiff’s stallion was struck by a moving train or engine *330on the railroad track of the defendant at a point where the defendant had no, legal right to fence the same, is not sufficient evidence of negligence to warrant you in finding a verdict for the plaintiff. If, therefore, you find from the evidence that the plaintiff’s stallion was struck and killed by a moving engine or train on the track of defendant’s railroad at a point where the same was unfenced, and that such point was a public highway, then the defendant had no legal right to fence, and your verdict must be for the defendant. To entitle the plaintiff to recover in this action, he must show that the stallion was struck by a moving train on defendant’s railroad track, at a place other than upon a county road or public highway. The onus of proof is upon the plaintiff, and unless he shows by a preponderance of the evidence that the stallion received the injury which caused his death at a point other than on a public highway, your verdict must be for the defendant.”
Upon the facts as exhibited by this record, the position of the trial court was that if the stallion entered upon the track at a point where there was no fence, but where the duty to fence existed, although it might be killed at a place afterwards where the statute made no requirements to fence, as a public highway, the defendant company would be liable. While the counsel for the defendant was contending for a literal construction of the statute, namely, that the statute specified that it was the killing of the stock upon or near an unfenced track, and as a track crossing an unfenced highway was an unfenced track, it was within the letter of the law; that the plaintiff, to bring himself within the statute, must show that his stock was killed on an unfenced track, and that by reason of the instructions, as given and refused, the defendant was prejudiced under the evidence as to whether the animal was killed on a public highway. The statute is: * * * “shall be liable * * * for any horse * * * killed upon or near any unfenced trade, ” etc, and is broad enough, construed liberally, to include highways, or depot grounds. But, as the court charged, such a construction is incon*331sistent with the reason of the statute and the purpose underlying its enactment.
It was, therefore, held in Moses v. Railroad Co., 18 Or. 385, that the statute did not apply to such places; that railroad companies were not required to fence their depot grounds or public road crossings, and as a consequence were not liable to pay for live stock which may wander upon the track at such places and be killed without negligence on their part. Such places, then, must be considered without the operation of the law, or the requirement to fence to guard the track from the entrance of stock thereon. To give the statute the construction contended for it would make it apply to places where the duty to fence is not required, as a public highway, where the track is necessarily unfenced to accommodate the public convenience. Proof that stock wandered on the track at such place and were killed would not render the railroad company liable, and the court so instructed the jury. It is at such places as the company is bound to fence and fails to observe that requirement of the law, whereby stock enter upon the track and are killed, which constitute the liability. As highways are excepted from its operation, there could be no liability for stock which may enter upon the track at a public highway and be killed; that result, if it occurred on a public highway, could only arise where the stock entered upon the track at some place where the duty to fence was neglected, and the animal running down the track was struck by the engine and killed at some place where the duty to fence did not exist, as a public highway or depot grounds. In such case the killing of the stock is the natural and proximate result of the duty neglected in failing to fence where the law required it; it is the want of a fence that has caused the injury. Hence, the theory of the court that if the horse strayed upon the track at a point where the company was bound to fence but had neglected to do so, it was liable, irrespective of the place at which the horse may have been killed. But it by no means follows, nor did the court so rule, that if stock *332was killed at a place where the duty to fence existed, but had been neglected, that a case of negligence was not made out. While, under the statute, the duty to fence is not declared in mandatory terms, it is implied from the omission to fence, or leaving the track unfenced, whereby stock may enter thereon and be killed. It is, therefore, the failure to fence, where stock are “killed upon or near any 'unfenced track” where the duty to fence existed, that constitutes the negligence and fixes the liability, the implication being the stock entered upon the track at the place where they were killed, and the requirement to fence was neglected. The action is prosecuted upon the omission to fence, so that when it is proven that the stock were killed at a place where the company is obliged to fence, but where it is not fenced — “an unfenced track” — the statute says that “such proof shall be deemed and held to be conclusive evidence of negligence.” This is upon the asumption that the company have failed to fence and keep the stock off of the track at a point where it was the duty of the company to fence, and where the cattle entered and by reason thereof were killed. It is true that in some jurisdictions under their statutes it is held that the point of entry must be alleged, and that the evidence must distinctly show that the stock got upon the track at a point where there should have been a fence, but there was none, otherwise the plaintiff cannot recover. But under our statute, and in view of the construction already given to it in Hindman v. Railroad Co., supra, where the facts to be alleged and proved are stated, when stock is killed or injured at a place where the company has failed to fence, but the duty to fence existed, é case of negligence is nude out, unless the defendant can show contributory negligence or misconduct.
If, then, the proof showed that the horse was killed by a moving train at a place where the track was unfenced, or where there was a failure to fence, and the law required it to be fenced, the defendant is liable; or, if the horse got on the track and was killed at a public crossing, as the *333court charged, the defendant is not liable. But if the horse got on the track where the duty to fence was neglected, and the horse was run down and struck by a moving engine and killed at a public highway, the injury originating in the failure to fence is the proximate cause of the injury, and, as the court charged, the defendant is liable. Under our statute, proof of the place where the horse got on the track only becomes material when the horse is killed at a public place or crossing, and the claim of the plaintiff is that he got on the track at a place where the law required a fence, and that his killing at a public crossing was the direct and natural result of an omission to fence. Such place being without the statute, the plaintiff, to bring the injury within its operation, would be required to show that it was caused by an omission to fence where the duty existed. In effect, the court charged this, but it did not charge, as there was evidence tending to show, that if the horse was killed where the duty to fence was neglected, a case of negligence was made out, and that the defendant was liable. The truth is, there is no pretence that the railroad is fenced anywhere in this region, and upon the facts, as disclosed by this record, how the defendant was prejudiced it is difficult to understand. Under our view of the law, the court by its instructions required stricter proof of the plaintiff than the statute would require in case the horse was killed where the duty to fence was neglected. As to the first instruction asked by the defendant and refused, in the first part it assumes a fact disputed, and in the last is covered by instructions given. As to the other two, the court does charge that the injury must have occurred from the omission to fence, which excludes injuries originating on highways to which the statute does not apply. Injuries originating from a failure to fence, although occurring on a highway, are tied to the causes away from it, and held within the operation of the law, so that the plaintiff to recover, must show that the inception of the injury or its cause was at a place where the duty to fence was neglected, *334which shows that it did not originate on a highway, but owes its occurrence and existence to causes away from it. Some of the authorities indicate that when the want of a fence is shown, and the injury is proven as the direct consequence of it, if the defendant thinks it occurred where no fencing is required, as on a public highway, that to avoid the liability thereby established the defendant ought to be required to show it. Referring to cases of this character, Mr. Rorer says: “When the absence of a fence is shown, and the injury is proven, th'en if the defendant will avoid liability by showing the occurrence to have originated at a place where fencing was not required, or’ was not allowable, as a public highway, or other public place, then the burden of proof is on the defendant to prove these facts; and if not absolutely necessary, yet it’ were the better practice to plead them.” 2 Rorer on Railroads, p. 1399. But however this may be, we are unable to see that there was error, and the judgment must be affirmed.