Letton, J.
This is an action to recover for personal injuries. The plaintiff at the time of the accident was in the service of the defendant as a cook upon a dining car running from Omaha to the Pacific coast. About 4 o’clock of the afternoon of the day on which the accident occurred, a fellow employee, named Roberts, was sent to his house in Omaha to request him to assist in stocking a dining car for the road. The shortest way to the car was through the yards of the railroad company. Roberts and the plaintiff entered the yards near Seventeenth street, and from thence started to walk eastward between the eastbound and westbound main-line tracks along a smooth and well-beaten track toward where the dining car stood, Langenfeld being about six or seven feet behind Roberts. At this locality there are four parallel railroad tracks. The track is curved from Fourteenth to Seventeenth streets. There was a long string of freight cars standing upon the first track to their right. As they reached Fifteenth street going east, a passenger train belonging to the Illinois Central Railroad Company using the defendant’s tracks approached upon the south main-line track, going about 15 or 20 miles an hour, which was the.usual rate of speed at that point. It is admitted that there is about five feet clear space between the sides of passenger coaches on this track and box cars upon the next track. *529Plaintiff says he first saw the approaching train when it was about a half block away. He stepped over toward the box cars, and, as the train approached, stepped partially between the ends of two of them, having his feet outside of the rails, his side and head outside of the opening, but with his shoulder partly between the ends of the box car. The cars between which he stepped were out of repair and defective, in that the drawheads were broken and gone, and they were coupled together with chains which allowed the ends of the cars to come as close as six inches to each other and to draw apart about three feet. At the moment he placed his shoulder between the cars, an engine at a distance of over a block away, and around the curve, moved the line of cars, pinching the plaintiff’s shoulder and inflicting upon him severe and permanent injuries. There is no evidence as to the presence or absence of signals when the cars were moved. As Roberts saw the train approaching, he stepped over to the box cars, leaned against the car, took hold of the bar or rail upon the side of the car which keeps the door in place, and held closely to it until the train had passed. A boy named Hourigan, who was employed as a call boy by the defendant, had ridden the switch engine to about Seventeenth street, when he got off and walked eastward between the same tracks as the plaintiff and Roberts, but about two or three car-lengths behind them. Like them, he first saw the Illinois Central train as it came around the curve, and, as it approached, was between it and the box cars in the same relative position as. plaintiff and Roberts. He continued to walk on slowly between tjie passenger train and the box cars, until the train passed, in the same manner as before. Neither he nor Roberts were injured. He testifies that he saw Langenfeld put his shoulder between the cars just as the switch engine was backing down another string of cars to connect with these. He and Roberts botli say that after they saw the Illinois Central train they had plenty of time to cross over *530to the north side of the south track, and both say they saw a switch engine at work near the west end of the box cars. Plaintiff’s testimony shows that he was fully acquainted with the locus in quo, passed along there frequently, that his reason for walking between, the two main-line tracks was that it was easier to walk there than on either side on account of there being no dirt, ashes and coal between these tracks, while there was upon and between the other tracks. He further shows that he knew that the track upon which the box cars were standing was a main-line track liable to be used at any time, and that the track upon which the Illinois Central train approached was also a main-line track used every day. There is little, if any, dispute in the testimony. The witnesses for the defendant, Hourigan and Roberts, testify substantially to the same state of facts as the plaintiff, except that they saw the switch engine at work, while plaintiff says he did not see it. At the close of the evidence the defendant moved for a directed verdict. This motion was overruled and the case submitted to a jury, which found for the plaintiff.
The defendant first contends that the court erred in refusing to submit to the jury the question whether or not the approaching Illinois Central train was the proximate cause of the injury. The petition alleged that the Illinois Central train approached at a rapid and unusual rate of speed, and without signals, but there was absolutely no evidence to support this allegation of the petition. The undisputed evidence shows that the train was approaching in the usual and ordinary manner,' and at a rate of speed not unreasonable, under all the circumstances. The court instructed the jury that the sudden approach of that train was not the proximate cause of the injury, and should not be considered, except as a circumstance in explaining the conduct .of the plaintiff and in determining whether he was guilty of contributory negligence in doing what he did. We think there was no error in this.
*531The court instructed the jury that they should consider the grounds of negligence named in the petition, “which are: (1) Negligence in having the two defective cars fastened together in the manner in which they were; (2) the moving of said cars without any warning or signal” — and that, if they found defendant was guilty of such acts, or one of them, which was the proximate cause of. plaintiff’s injury, they should find for the plaintiff. Defendant contends that this was error, for the reason that there was no evidence that signals were not given before the cars were moved, and because it owed no duty to the plaintiff in respect to the defective bumpers. That plaintiff’s occupation as a cook did not require him to enter the space between the cars, and there was no invitation, either expressed or implied, for him or any one else, except employees connected with the operation of the train, to place himself in such a dangerous position. It also takes the broad position that no actionable negligence of any kind is shown by the record, and further that plaintiff was guilty of contributory negligence.
For convenience, we will consider these points together, except the assignment as to contributory negligence. What Avere the plaintiff’s rights, if any, between the tracks? We cannot accede to the position that he was a mere trespasser there. On the contrary, we think that the evidence shows such a permissive use of the. way between the tracks by the employees of the defendant that there was an implied invitation to its use by plaintiff and other servants of the company when going to and from their work, or while engaged upon the company’s business. This being so, the defendant was bound to use ordinary care to keep the way safe, so that persons using it would not be exposed to dangers other than might be reasonably expected in such locality. So far as shown by the testimony, this was done. If the defendant had been injured by a negligently and improperly loaded car whose load projected over the way, or if, while on the usual path, he had been injured by the negligent operation of a train, *532it is probable that liability would exist. But, in order to permit a recovery even in such a case, the danger must have been such as not usually incident to, or as not liable to be foreseen as a result of, the usual and ordinary operation of trains in that place. The passage of trains in opposite directions is an incident which employees knowingly using a walk between main-line tracks must be charged with notice of, and the usual yisk and danger from passing trains must be taken to be assumed by an employee who voluntarily chose this path, when, as the evidence shows, others were open to him. But the plaintiff was not injured while upon this path. The duty of the defendant to him while in that situation had been fully performed.
Plaintiff asserts, however, that the sudden approach of the Illinois Central train made it necessary for him to step between the box cars, and that the defendant owed him a duty of keeping such cars in repair. But his testimony clearly shows that he was fully advised of the dangers of the place in which he was walking, and the approach of the Illinois Central train was a circumstance which he must have foreseen. He can therefore base no claim against the defendant on account of its approach in the manner that it did.
It has been well said that, “in order to constitute actionable negligence, there must exist three essential elements, namely, a duty or obligation which the defendant is under to protect the plaintiff from injury; a failure to discharge that duty; and injury resulting from the failure.” Means v. Southern C. R. Co., 144 Cal. 473, 1 Am. & Eng. Ann. Cases, 206; Indiana & Chicago Coal Co. v. Neal, 166 Ind. 458, 9 Am. & Eng. Ann. Cases, 424; Faris v. Hoberg, 134 Ind. 269. The petition must allege these essential elements, and the proof must support the allegations, or there can be no recovery. The petition in the instant-case may set forth sufficient facts to warrant a recovery, though this we do not decide, but the evidence falls far short of proving the material averments thereof. The *533first charge of negligence is that the defendant negligently owned, kept and used two defective freight cars, which defective and broken condition had existed for a long time, and of which the defendant long prior to the happening of the injuries had due notice, but which was unknown to the plaintiff. As to this allegation of time and notice there is no testimony whatsoever. So far as the record shows, the defective condition of the cars might have been the result of an accident for which the defendant was not to blame and as to which no negligence existed, and it might have occurred so recently that the cars were being moved for the first time thereafter, and for the purpose of repair; in fact, the evidence does show the movement was in the direction of the shop yard.
Another charge is that the Illinois Central passenger train approached at a rapid and unusual rate of speed, and without signals or Avarnings, and was almost upon the plaintiff before he was aware of its presence; but he testifies that he saw it when it was about a half block away, and there is no evidence to shoAv that the rate of speed was excessive or unusual.
The next allegation is that, in order to save himself, the plaintiff hurriedly stepped away from the track, and stepped between the freight cars, and that, while so standing, the cars were moved by the switch engine without signal or warning; but there is no evidence that the cars Arere moved without signal or warning, or in other than the usual manner, or that the defendant knew or should have known of his dangerous position.
Does the evidence establish the fact that the defendant oAved plaintiff a duty in respect to the defective cars? He was not in any Avay connected with the operation of the freight train, hence he was under no obligation to his employer to go between the cars. The cars Avere upon a track Avhere to plaintiff’s knowledge they were liable to be moved at any time, and, even if the drawheads had been perfect, the position between them was one of danger. The license was to use the path between the tracks, and the *534defendant’s liability is only commensurate with the extent of the license. Note to Ryerson v. Bathgate, 57 L. R. A. 307, 67 N. J. Law, 337. When plaintiff stepped out of the beaten way between the cars, the only duty owing to him by the defendant was to exercise proper and reasonable care not to injure him, as soon as it acquired knowledge of his dangerous position. But the act of placing himself in danger and the act of moving the cars were apparently simultaneous. The defendant had no knowledge of his danger and no reason to anticipate that a stranger to the operation of the train would, while the cars were in its private yards, place himself in such a position. This view is in entire harmony with the principle laid down in Chicago, B. & Q. R. Co. v. Wymore, 40 Neb. 645, that “A railroad company does not discharge its whole duty by refraining from wantonly injuring a trespasser upon its 1 racks after observing his position. It is bound in all cases to exercise reasonable care to avoid injuring all persons who are known to be, or who may be reasonably expected to be, upon its right of way.” Chicago, B. & Q. R. Co. v. Wilgus, 40 Neb. 660. And is also consistent with Shults v. Chicago, B. & Q. R. Co., 83 Neb. 272. See, also, Hogan v. Chicago, M. & St. P. R. Co., 59 Wis. 139; Illinois C. R. Co. v. Schmitt, 100 Ill. App. 490; Illinois C. R. Co. v. Parkhurst, 106 Ill App. 467; Schreiner v. Great Northern R. Co., 86 Minn. 245, 58 L. R. A. 75.
The case does not fall within the rule that, where one negligently places another person in a position of sudden danger, any injury AA'hich he may suffer by reason of the instinct of self-preservation is taken to be the effect of the dangerous exciting cause, for in this case the evidence fails to shoAV any negligent act on the part of defendant, or any one else, causing a sudden or unusual circumstance calculated to deprive the plaintiff of his presence of mind to such an extent that he acted involuntarily. We think the evidence is insufficient to affirm*535ntively disclose tlie neglect of any duty owing by tlie defendant to tbe plaintiff.
The judgment of tbe district court is reversed and cause remanded for further proceedings.
Reversed.