Opinion of the Court by
Judge Carroll
Affirming.
This appeal brings before us for construction the law relating to railroad fences and cattle guards. The appellant in' this action sought to recover damages for injuries sustained by her'stock caused by the alleged failure of the appellee company to erect fences and cattle guards in the manner provided in the Kentucky Statutes. A demurrer was sustained to the petition as amended' and reformed, and, from the judgment dismissing it, this appeal is prosecuted.
It is averred in the petition that appellee owns and *641operates a railroad through the farm of appellant; that on one side of the railroad appellant constructed a fence extending more than half the distance on the division line between appellant and that of the company, and notified the company, but not in writing, to erect .a fence on the other half of the line. The company failed and refused to erect any part of the fence. It is further alleged that the company built two cattle guards, but erected them in an insufficient manner and at improper places.
We will first consider.so much of the petition as related to fencing. Section 1789 of the Kentucky Statutes of 1903 provides that: “When any corporation * * *owns right of way, and its railroad shall have been constructed and in operation for the period of five years, the same is hereby put on equal terms and obligations with other landowners owning adjoining lands in this commonwealth.” Section 1790 that:’ “Every such corporation or person owning or'controlling and operating a railroad in this commonwealth, and owning right of way, shall construct and maintain a good and lawful fence on one-half of the distance of the division line between such rights of way and the adjoining lands, except as is hereinafter provided. * * *” Section 1791 that: “When either party, either the corporation or person owning or controlling and operating such railroad, or the owner of lands adjoining the right of way thereof, has constructed or does construct a good and lawful fence on the division line between such right of way and the lands adjoining the same for one-half’the distance of said line, and the other party has not constructed such fence on said line for half the distance thereof, nor has paid a sum sufficient to construct said fence or any sum herein provided, shall in writing notify *642the party in default of the length of the division line between them, and that the party serving such notice has constructed a good and lawful fence on said division line for oñe-half the distance thereof; and it shall be the duty of the party on whom such notice is served, and he is hereby required, to construct a good and lawful fence on the other half of the distance of said division line, within four months after date of receiving said notice.* * *” The section further fixes a penalty that may be recovered by warrant upon the party upon whom notice is served if he or it fails .to construct the necessary fences within the time prescribed. Section 1792, in part, provides that: “Nor shall such corporation or person be required to construct said fences as hereinbefore provided through unimproved and uncultivated lands, until the owner of such lands shall have previously enclosed said lands on three sides with sufficient fences, or unless such land be enclosed with fence and a river, creek, bluff or other natural barrier as will prevent the egress of stock.” Section 1793 that: “All corporations and persons owning or controlling and operating railroads as aforesaid shall erect and maintain cattle guards at all terminal points of fencing constructed along their lines except at points where such lines are not required to be fenced on both sides, and at public crossings. But, where there is a private passway across said railroad, the land owner for whose benefit it is kept open shall bear one-half of the expense of such cattle guards and gates, — the former to erect the gates, the corporation or person' operating the railroad to erect the cattle guards.” Section 1795 that: “All laws and parts of laws governing the construction of farm fences are held hereby to apply to railroad fences in all cases where, *643by the provision of this act, railroad corporations are required to fence their right of way.” This statute is an act of February 25, 1893. An act of February 20, 1893 (Laws 1893, p. 491, c. 148, section 5)*, now article 1 of chapter 48 of the Kentucky Statutes, relates particularly to farm fences; and provides, in section 1784, that “when a division fence is desirable or is made necessary by the division of improved or inclosed lands, or when no fence or no division fence exists between the improved or inclosed lands of adjoining owners, or lands where the right of way is owned by one party, either party may after he has built a lawful fence upon his proportion of the line to require the other to erect a lawful fence out of planks, wires, rails, or wire and plank, upon his proportion of the line, and, if he fail to do so after three months notice in writing, may erect such fence and recover from the recusant the cost thereof, * * * but nothing herein shall be construed to conflict with an act requiring railroad corporations and other persons owning and operating railroads and land owners to fence their right of way and railroad track, and to construct barriers and cattle guards at certain public roads and highway crossings, and to maintain and keep the same in repair; and prescribing the remedies and penalties for failing to do so. ’ ’ Section 7 of the act (Laws 1893, p. 521, c. 152), now section 1795 of the Kentucky Statutes, as it originally stood, read: That “for the purpose of this act, any fence constructed of substantial posts well set, not less than two feet in the ground and at no greater distance apart than ten feet, with wire not less than four and one-half feet high, consisting of seven strands, shall be held to be a good and lawful fence; but, nothing herein shall be construed to prevent parties from *644erecting any other class of lawful fences. ’ ’ By an act of 1900 (Laws 1900, p. 40, c. 11) this section was repealed, and, in lieu thereof, section 1795 as above set out was enacted. This court in Owensboro & Nashville R. Co. v. Courts, 109 Ky. 154, 58 S. W. 521, 22 Ky. Law Rep. 672, in construing this statute, held that it was the legislative intention to put railroads upon an exact footing with other landowners in the construction of division fences, subject to the exceptions contained in the law. When this case was decided, section 1795 of the original act had not been repealed by the act of 1900; but the act of 1900, now section 1795, makes plain the legislative intent upon this subject, and there can be no longer any question that the statutes governing the construction of farm fences applies to railroad fences.
It is argued, however, that under section-1790 it is the absolute duty of the railroad company to construct and maintain a fence on one’half the distance of the division line when the adjacent owner has erected a fence on one half the" distance. If this section stood alone, or was not to be read or considered in connection with the other sections of the law, there would be much force in this contention. But, this act — in fact both acts, the one relating to farm fences as well as railroad fences — must be read as a whole; and, when so construed, this section merely declares what is the abstract duty of the railroad company and landowner in respect to the reciprocal obligations imposed upon each according to the other sections of the law. This view is we think made clear by the fact that other sections contain exceptions and reservations that would be entirely unnecesary, indeed, meaningless, if the duty to fence was imposed without qualification by section 1790. The general purpose *645of the law was to place railroad companies and adjoining landowners on precisely the same footing imposing upon each the same duties and obligations. What the railroad company can require the landowner to do the landowner can compel the railroad company to do. Neither party can be required to erect fences parallel with the railroad unless the land is improved or inclosed, or, if not, until the land has been inclosed on three sides with sufficient fences; or there is a river, creek, bluff, or other natural barrier that will prevent the egress of stock. When land is improved or inclosed, or is inclosed on three sides by fences or natural barriers, but there is no fence along the. line of railroad, the landowner or the railroad company may construct a fence parallel with the railroad on the line between the right of way and the adjacent owner for one-half the distance of the line, and when this has been done the party who has constructed the fence may in writing notify the party in default of the length of the division line between them, and that he has constructed a good and lawful fence on the division line for one-half the distance thereof, thereupon it shall be the duty of the party upon whom the notice is served to construct a good and lawful fence on the other half of the distance of said division line within three months after the date he received the notice. If the party who has been duly notified fails to construct a fence within the time prescribed, such party may be fined $1 for each day after the expiration of the period of four months during which the fence has not been constructed. In addition to this penal liability, the party who has erected a fence on one-half the division line may after the expiration of three months from the service of notice proceed to erect a fence on the other party’s proportion of the *646line, and recover from him the cost thereof. The construction of division fences is altogether a creation of the statute, and the party who desires to, invoke the statute in his behalf must show that he has performed the conditions, precedent necessary to enable him to set it in operation against the delinquent. So that the party who desires fencing to be erected on the line between the railroad company’s land or right of way and that of the adjacent owner cannot compel the other party to erect any portion of the fence until and unless he makes it appear that there has been erected by him on one-half the distance a sufficient fence, nor until he gives notice in writing of this fact to the other party. If the land through which the railroad runs, is, unimproved and uncultivated land, neither party can; be required to erect a fence parallel with the railroad until the lands of the adjacent owner shall have been previously inclosed on three sides with sufficient fences or with natural barriers; but, if the adjacent land is inclosed or improved, then either party may require the other to erect a fence upon the terms herein indicated.
The petition of plaintiff was fatally defective in two particulars — it .did not allege that written notice was given, or that the land through which the railroad run was improved land, or, if unimproved and uncultivated, that it was inclosed on three sides with sufficient fences or such natural barriers as would prevent the egress of stock. Cattle guards are required to be erected and maintained by the corporation at all terminal points of fences constructed along their lines and at public crossings, except at points where the railroad is not fenced on both sides. In other words, cattle guards can serve no useful purpose unless the railroad right of way is fenced on both sides. It *647would be folly to have cattle guards without parallel fencing. The only purpose of cattle guards is to keep cattle from entering and straying on the right of way of the company, and, of course, if the right of way is not fenced, cattle guards could not possibly accomplish this object. If there was- a parallel line of fencing on each side of the railroad, this would not protect the right of way from the trespass of stock unless cattle guards were erected at the terminal points of fences and on each- side of the public roads that cross the railroad; as, in the absence of cattle guards, stock on the public road could enter upon the right of way of the railroad at every public crossing, and, where the parallel fencing terminated , they would also enter unless prevented by cattle guards. It necessarily follows from, this conclusion that the company cannot be required to erect cattle guards except at points where under the fencing law either the company or the owner miay require fencing to be constructed; nor can their erection be demanded until such fencing has been erected. When parallel lines of fencing have been constructed along both sides of the railroad, then it becomes the duty of the company to erect cattle guards at public crossings and at the terminal points of fencing; and, if delinquent in this respect, the company may be required to respond in damages to any person whose stock has been injured or killed by its failure to erect and maintain them. McGhee v. Gains, 98 Ky. 182, 17 Ky. Law Rep. 748, 32 S. W. 602; McGhee v. Guin, 98 Ky. Law Rep. 209, 17 Ky. Law Rep. 794, 32 S. W. 615; L. H. & St. L. R. Co. v. Beauchamp, 108 Ky. 47, 55 S. W. 716, 21 Ky. Law Rep. 1476.
We think the foregoing views are fully supported by the opinion in McKee v. C., N. O. & T. P. Ry. Co., *648102 Ky. 253, 43 S. W. 241, 19 Ky. Law Rep. 1270, where the court, in á case involving the cattle guard statute, said: “The purpose of the law is to have the roadway entirely fenced up for the protection of the traveling public, though protection to stock is also secured by the statute, for it is where the right of way is. not fenced that the landowners with division fences between them would need cattle guards, and where the statute would require them if its purpose was to compel the company to inclose the lands of adjoining owners. The remedy of the landowner is to build his fence along the right of way and require the company to do likewise. Then no cattle guards will be needed except at public and private crossings, and this the statute requires, and at the terminal points in the parallel fencing along the right of way, and this is what the statute demands. These points are not necessarily between the property lines of the various owners, but are wherever the lateral fencing for any reason stops, and where from the want of cattle guards at the stopping places the road under fence would be left open for trespass. Whenever the track leaves ground which the company is bound to fence and passes onto ground which the company is not bound to fence there must be cattle guards placed so as to completely fence in the track. The company, not being under any legal obligation to maintain cattle guards at the points of entering- and leaving the complainant’s farm merely because they were dividing lines, with his neighbors, might remove them at any time.” Under this construction of the statute, the rights- of the landowner are fully protected. If he desires fencing between his land, that is improved or inclosed, or inclosed on three sides by fences or barriers, and that of the railroad company, *649all that he need' do is to erect a sufficient fence on one-half the division line, and then he may by observing the directions of the statute require the company to erect the other one-half. In the case before us, as the right of way of the railroad was» not inclosed on ( both sides by parallel fences., cattle guards were not required. Hence appellant cannot recover damages for the failure of the company to. erect them.
,Wherefore the judgment of the lower court is affirmed.
Nunn, J., dissents.