Respondent recovered judgment for the loss of five cattle killed by appellant's engine. Respondent's complaint is brief and so that the reader of this opinion may better understand the issues, we set it out in full. It alleges:
"1. That the defendant, Union Pacific Railroad Company, now is, and at all times hereinafter mentioned was, a corporation organized under the laws of the state of Utah, and owned and operated a line of railroad in Morgan County, this state, together with rights of way, tracks and locomotives and other appurtenances used by it in and about its business. *Page 166
"2. That said defendant, near the village of Devil's Slide in Morgan County, this state, did on November 6th, 1931, and for a long time prior thereto had failed to comply with its statutory duty to erect and maintain any fence on each side of its railroad where the same passed through lands owned and improved by private owners and connect the same at road crossings with cattle guards, and that at said time and place defendant negligently ran and managed one of its locomotives by failing to sound its whistle or ring its bell, or to stop the same in time to avert injury to plaintiff's livestock which theretofore entered then and there upon and near said track at a place to plaintiff unknown, so that the said locomotive ran against and over three Hereford cows, one Hereford steer, and one Hereford calf then and there the property of the plaintiff and of the value of $212.00, and injured and killed the same to the plaintiff's damage in said sum of $212.00."
Appellant, in its brief, has assigned 14 errors and so far as may be necessary, we will treat the claimed errors in the order of their assignment. But before proceeding to a consideration of these assignments and to better understand them, it is necessary to refer to the evidence.
Devil's Slide is a small town on the north side of appellant's tracks in Weber Canyon, Utah, where station grounds are maintained for passing trains and to accommodate the town and the business of the cement company located at the edge of the town. The land lying north of the town is grazing land and is not privately owned or improved.
The railroad grounds embrace the area between two bridges which span the Weber River, and are east and west of the town and are 2040 feet apart. There are five tracks on the station grounds, two main tracks, a passing track, a business track, and spur track leading to the Union-Portland Cement Company plant. The first four mentioned tracks are south of the depot, and the last is north of the depot and diverges from the main track just east of the west bridge. Just north of the depot there is a street known as Ogden Avenue, which runs in an easterly and westerly direction, nearly the entire length of the station grounds. On the east and on the west side of the depot there are roads used by the public. The distance from the depot to the *Page 167 west bridge is 1020 feet. The cattle were killed somewhere between 36 and 365 feet west of the depot. On the south of the town and just north of the track there is a small park, the property of the cement company, which is partly a railroad property and the land between the park and the town is not privately owned or improved. It appears that some years prior to the time the cattle were killed the cement company had planted the park to trees and grass, but that for two or three years prior to the killing of the cattle the only care given to the park was the watering of the trees, and this was done by appellant. Immediately south of the tracks there is a fence, next the state highway, and south of the state highway are bunk houses used by appellant's section hands. South of these houses are the walls of the canyon, which is part of the public domain lying south. The railroad right-of-way is 400 feet wide, and the only privately owned property in that vicinity in Buckingham Park, and it is devoted to public use.
The duty imposed on railroads in this state to fence their right-of-way is entirely statutory, there being no common law duty. Edwards v. Salt Lake City Utah 1Railway Company, 70 Utah 496, 261 P. 445; Elliott on Railroads, 3 Ed., Sec. 1695.
Respondent bases his right to recover on appellant's failure to comply with Section 1253, Compiled Laws of Utah 1917. We quote that section in so far as it applies in this way.
"Every railroad company operating a railroad by steam, electric, gasoline, or any other mechanical motive power within this state, or which hereafter constructs or operates any such road, is hereby required to erect, within one year, and thereafter maintain, a fence on each side of its railroad where the same passes through lands owned and improved by private owners, and connect the same at all public road crossings, with cattle guards. * * *"
The court properly withdrew from the jury's consideration those allegations with respect to the alleged negligent operation of the train, so that the judgment is founded upon *Page 168 those allegations that have to do with appellant's failure to maintain fences on each side of its railroad. Appellant admits there is no fence on the north side of the railroad but contends there was no duty on its part to maintain one for the reasons hereinafter discussed.
Appellant, in its first assignment, contends that the section of law quoted above has no application in this case because the railroad at the point where the cattle got onto the track and were killed does not pass through lands owned and improved by private owners.
Appellant also contends that its railroad does not pass through lands privately owned and improved, even though we assume that Buckingham Park is privately owned and improved, for the reason that it clearly appears that there is not privately owned or improved land on the south of the railroad. It further contends that "through" is different from "along" or "adjacent to," and imposes the duty only where there is such improved land on both sides of the right-of-way.
We are not prepared to say that before the railroad company must erect a fence it is necessary that the land must be severed into two portions, one lying on each side of the right-of-way. "Passes through" may mean more than dividing lands privately owned, so the same owner will have lands on 2-4 both sides of the right-of-way. It may apply where the railroad is laid out along the dividing line between two owners, lapping off a piece from each, or where it takes a strip of privately owned land along one side and where the other side of the right-of-way abuts on publicly owned lands. It could hardly mean going along the boundary of privately owned lands but in no way breaking the enclosure of fence or the private owners' boundary lines. Its purpose seem to be to require a fence where the railroad either by dividing private lands or breaking the owner's close by taking a portion thereof created a risk to livestock which did not otherwise exist within the boundaries of the private owner's close. In this case the railroad *Page 169 right-of-way went along side of, but not through or over, lands which were or had been privately owned. There was under the statute no duty on the railroad company to fence. As to whether the railroad would be required to fence in going over privately owned lands, not enclosed by fence or otherwise improved except by grazing of livestock, is not now before us and as to that matter we express no opinion.
Appellant has also assigned many other claimed errors, but we feel it unnecessary to discuss any of them except the sufficiency of the complaint. To the complaint the appellant filed a general and special demurrer. The lower court overruled the general demurrer and sustained the special demurrer. It does not clearly appear why the Court sustained the special 5 demurrer, but immediately upon the Court sustaining it, leave was asked and granted to amend by interlineation, and the italicized portion of the complaint was then inserted. When respondent called his first witness objection was made by the appellant to the introduction of any evidence on the ground that the complaint failed to state a cause of action. At the close of all the evidence appellant moved for a directed verdict, and again assigned the same reasons. The appellant again assails the sufficiency of the complaint on this appeal. If the complaint fails to state a cause of action it is a jurisdictional matter and may be raised at any time. Mangum v. Bullion, Beck Champion Min. Co., 15 Utah 534, 50 P. 834.
The trial court evidently took the view point that the complaint was insufficient before the amendment was made, because it did not state where the cattle had entered upon the right-of-way. In this we think the court was correct, because if the cattle entered at a place where there 6, 7 was no duty to keep a fence, then appellant would not be liable. If this is so, then how can it be said that by the addition of the phrase "at the place to plaintiff unknown" anything is added to the allegations of the complaint. We do not think it necessary for a plaintiff to allege *Page 170 and prove the exact place of entry, but we do think it necessary for him to allege sufficient facts to bring himself within the provisions of the statute; that is, he must allege that they entered from land privately owned and improved or where the railroad entered such lands through lack of cattle guards.
This case is therefore reversed with instructions to dismiss the complaint. Costs to appellant.
FOLLAND, C.J., and HANSON, WOLFE and LARSON, JJ., concur.
MOFFAT, J., being disqualified, did not participate herein.