delivered the opinion of the court.
This action was brought by Samuel L. Sanger to recover of the Chesapeake & Ohio Railway Company damages to the amount of $500 alleged to have been sustained by the plaintiff by reason of the killing of three of his horses by a train of th'e defendant.
The declaration contains two counts, averring that the values of the animals killed are as follows: One black horse, $130; one brown mare, $175; one gray mare, $150; total, $445; and at the close of each count there is further averment to the effect that the plaintiff is also entitled to the sum of $45 for being deprived of the Use of the horses, and the total damages claimed are $500; the negligence alleged being the failure of the defendant to erect and maintain a fence at the point where the horses were killed.
The defendant demurred to the declaration upon two grounds: (1) That the declaration does not aver that the plaintiff was the owner or occupant of the land at the place at which' the horses entered upon the defendant’s railroad, and that the provisions of section 1258 of the Code of 1887, and the acts amendatory *88thereof, were solely and exclusively for the benefit and protection of adjoining landowners; (2) That the defendant was under no obligation to fence its track at any point where the same adjoined a public highway.
The demurrer was sustained, and to this judgment of the Circuit Court the case is before us upon a writ of error awarded by one of the judges of the court.
It is insisted by counsel for defendant in error that this court has no jurisdiction, as the measure of plaintiff in error’s damages is $455, with interest thereon from the date of the killing of the horses, May 20, 1902, and therefore less than $500, since the sum of $45, which the declaration avers he ought to have for loss of the use of the horses, cannot be recovered.
As observed, the total damages claimed by the plaintiff is $500, the amount necessary to confer upon this court jurisdiction. '
In Hawkins v. Gresham, 85 Va. 34, 6 S. E. 412, it is held that the matter in controversy is that for which suit is brought or for which the judgment is rendered, and not that which may or may not come in question. And in Cox v. Carr, 79 Va. 28, the rule stated as controlling the determination of the question of jurisdiction where the claim sued on is a money demand is: “If the claim be merely colorable in order to give the court jurisdiction, and that was made to appear, jurisdiction would be declined, for jurisdiction can no more be conferred than it can be taken away by improper devices of parties. Hansbrough v. Stinnett, 22 Gratt. 593.”
It follows, therefore, that when the claim asserted is of amount sufficient to confer jurisdiction upon this court, and it is not made to appear that the claim is merely colorable, we are not warranted in saying, as a matter of law, that the $45 claimed for the loss of the use of the horses killed, and as a part of the total demand made of $500 as damages, is not recoverable; the presumption being that the *89claim is made in good faith, and the right to its recovery is to be determined from the facts proven. As well said by counsel for plaintiff in error, if the object in claiming the $45 for loss of the use of the horses killed was merely to increase the amount of the damages sued for to the minimum amount necessary to confer jurisdiction upon this court, the estimated value of the horses could easily have been increased to that amount.
The question presented on the demurrer is whether or not a railroad company is liable to the owner of stock killed or injured on its track by one of its trains, who owns no land either at the point where the stock is killed or injured, or at the point where it comes upon the company’s track, or the right of way on which the same is constructed, when the only negligence alleged by the plaintiff is the failure of the railroad company to fence its roadbed as required by the provisions of section 1258 of the Code of 1887, as amended hy the Act of February 9, 1898 (Acts 1897-98, p. 313, c. 283), qualified by section 1259 of the Code of 1887, as amended by the Act of February 8, 1898 (Acts 1897-98, p. 279, c. 250), and the decision of this question turns upon the construction to be given those statutes.
Section 1258, as amended, is as follows:
“Sec. 1258. To Enclose Roadbeds with Fences; Qatile Guards.—Every such company shall cause to be erected along its line and on both sides of its roadbed lawful fences as defined in section two thousand and thirty-eight, which may be made of timber or wire, or both, and shall keep the same in proper repair, and with which the owners of adjoining lands may connect their fences at such places as they may deem proper. In erecting these fences the company shall, at the termini of those portions of its roadbed which it is required to fence, and on each side of all public and private crossings, construct across its roadbed and keep in good repair sufficient cattle guards with which its; *90fences shall be connected. Such cattle guards at private crossings may, with the consent of the owners of said crossings, be dispensed with, the company in lieu of cattle guards erecting and keeping in good order sufficient gates. But no court of this Oommonwealth shall have jurisdiction by writ of mandamus -or otherwise to compel the erection of such fences, or building such cattle guards.”
Section 1259, as amended, is as follows:
“Sec. 1259.....The preceding section so far as it relates to fencing shall not apply to any part of a railroad located within the corporate limits of a city or town, or between the terminals of the switches, either way, from the company’s depots, nor to any part of a railroad at a place where there is a cut or •embankment with sides sufficiently steep to prevent the passage of stock at such place; nor shall it apply to a company which has compensated the owner for making and keeping in repair the necessary fencing; but the burden of proving such compensation shall be upon the company, and no report of any commissioners shall be received as proof thereof, unless it shall plainly appear on the face of the report, or from other evidence in connection therewith, that an estimate was made by such commissioners for the fencing, and the expense of the same •entered into and constituted a part of the damages reported and actually paid.”
In section 1258, as originally enacted, and as adopted into -the Oode of 1887, c. 52, after the words “Every such company shall cause to be erected along its line and on both sides-of'its roadbed,” the words “through all'enclosed lands or lots,” followed. Therefore the material change made by the amendment above set out is the omission of the words “through all enclosed lands •or lots.”
The only change made in section 1259 by the amendment *91thereof, supra, is in the insertion of the words italicized, viz., “or between the terminals of the switches,” in lieu of “nor within an incorporated town for the distance of one-quarter of .a mile” either way from the company’s depots, and this amendment is not material in the consideration of this case; nor does the amendment to section 1258 of February 15, 1900 (Acts 1899-1900, p. 393, c. 373), affect the issue.
The decision of the United States Circuit Court of Appeals .at Richmond, Va., in Newsom's Adm'r v. N. & W. R. Co., 81 Fed. 133, 2 Va. Law Reg. 882, is greatly relied on by defendant in error in support of the contention that the benefit and protection conferred by section 1258 of the Code of 1887 is limited exclusively to such stock owners as are also the owners or occupants of lands adjoining a railroad’s right of way; but the argument here, and that in support of the decision referred to, loses its force, since the Legislature, by the amendment of section 1258, supra, has imperatively required railroad companies to erect and maintain fences along their lines, and on both sides of their roadbeds, except at the points mentioned in section 1259, as amended, supra, unless the proviso in the last-named section, that the first named shall not “apply to a company which has compensated the owner for making and keeping in repair the necessary fencing,” restricts its provisions to the benefit and protection merely of the adjoining landowners.
The plain object and purpose of section 1259 is to specify what points, and what points alone, along the right of way of a railroad company, are to he excepted from the operation of section 1258; and, while section 1259 provides that section 1258 shall mot apply to a company which has compensated the owner of .adjoining lands “for making and keeping in repair the neces.sary fencing,” it does not release the company from its duty to fence its right of way as required by the provisions of section 1258, but merely gives to the company the right of defence •against such adjoining landowner in an action by him to recover *92damages for stock killed or injured upon the right of way of such railroad company. In such an action section 1259 provides that the defendant company may make the defence that it has compensated the plaintiff for making and keeping in repair the necessary fencing which the railroad company was required to erect and keep in repair under the provisions of section 1258. Such was the case of Tonawanda R. Co. v. Munger (N. Y.) 49 Am. Dec. 272. But such a defence cannot he availed of in an action to recover damages for stock killed or injured, brought by a plaintiff not owning the land adjoining the defendant’s right of way at the point where the stock passed onto the track of the defendant,' and it has neglected the duty of fencing its roadbed at that point.
Immediately following the decision in Newsom's Adm'r v. N. & W. R. Co., supra, which held, as we have observed, that section 1258 of the Code of 1887, as it originally stood, was for the protection of the adjoining landowners alone, the amendment of that section mentioned above was enacted by the Legislature, the effect of which, as we construe it, is to extend the requirements of the statute to all lands, inclosed and uninclosed, which adjoin a railroad’s right of way. The constitutionality of the statute has never been questioned in this court, but very similar statutes have been reviewed in the courts of other States, as well as in the United States Supreme Court, and in each instance the statute has been upheld on the ground that it was an exercise of the police power of the State.
In Mo. Pac. R. Co. v. Humes, 115 U. S. 512, 6 Sup. Ct. 110, 29 L. Ed. 463, the statute of Missouri requiring railroad companies to erect fences, cattle guards, etc., and, providing that until they did so, they should pay to stock owners double the value of stock killed, came under review; and it was held not to be in conflict with the Constitution of the United States, on, the ground that it was enacted in the exercise of the police power of the State. See, also, Rozzelle v. Hannibal, etc., R. Co., 79 Mo. 349; Ill. Cent. R. Co. v. Trowbridge, 31 Ill. App. 190.
*93In Indiana, etc., R. Co. v. Guard, 24 Ind. 222, 87 Am. Dec. 327-—a case very similar in its facts to the case at bar—it was held that an act requiring railroads to fence is in the nature of a police regulation designed to promote the security of persons and property passing over the road, and hence, though the owner of the animal be not an adjoining proprietor, and be guilty of negligence in permitting it to stray upon the land adjoining the road, he may recover, if the company has failed to comply with the requirements of the statute. In the opinion it is said: “The law requiring railroad companies to fence their tracks is a police regulation for the benefit of the public, and therefore the fact that a railroad runs alongside of a public highway would seem to require peculiar care on the part of the company in complying with the law.” See, also, New Albany, etc., R. Co. v. Tilton, 12 Ind. 3, 74 Am. Dec. 195, and note and authorities cited at page 200.
“Where a railway’s right of way runs parallel to a highway, the erection of a fence is required, unless its erection would destroy the use of the highway as such. And the company is required to erect a fence in such cases, although the entire width of the right of way cannot be inclosed, and a part of it has to be thrown into the highway.” Hannibal, etc., R. Co. v. Rutledge (Mo.), 19 Am. & Eng. R. Cases 669. See, also, 3 Elliott on Railroads,, p. 1833.
“The fact that a public highway runs along the side of the railroad track does not, of itself, show a valid reason why a fence should not be maintained between the road and the track, but rather a stronger reason why the track should be fenced.” 2 Thompson’s Com. on Reg., p. 2055.
The case of Maynard v. N. & W. R. Co. (W. Va.), 21 S. E. 733, cited by counsel for defendant in error, holding that the West Virginia statute, identical with section 1258 of our Code of 1887, before its amendment, supra, applies to inclosed lands *94only, like the decision in Newsom’s Adm'r v. N. & W. R. Co., supra, has no application to a case involving the construction of the statute as amended. We are also unable to see the force of the argument for defendant in error that, because the stock in this case strayed from the highway to the railroad track, it was-trespassing upon the company’s property, and plaintiff in error could not invoke the provisions of the statute requiring the company to fence its track. It was clearly the object of the Legislature, by the amendment to section 1258, supra, as we construe it, to afford protection to passengers and property passing over a railroad, and to this end to require fences wherever stock or cattle were likely to stray onto the track of a railroad; the section immediately following specifying the points at which it was not deemed necessary to the object in view to fence the track. Such an enactment, being an exercise of the police power of the State for the benefit of the public, is not in conflict with any constitutional inhibition.
We are of opinion that the declaration in this case sets out a good cause of action, and that the demurrer thereto should have been overruled. Therefore the judgment of the Oireuit Court will be reversed and annulled, the demurrer overruled, and the cause remanded, to be further proceeded with in accordance with the views expressed in this opinion.
Reversed.