Robinson, J.
The plaintiff is a minor, and appears by his next friend. In June, 1894, when he was about fourteen years of age, while he was walking across Fourth street, in Cedar Rapids, his left foot was caught between a main rail and a ouard rail of one of the defendant’s railway tracks, which were laid in the street, and was run over by a car, and so injured that the limb was necessarily amputated. The evidence tends to show the following facts: Fourth street extends from north to south, and is crossed at right angles by several streets, among which are O and D avenues, the latter being farthest north. From a point south of C avenue, to a point a considerable distance north of D avenue, several railwav tracks, including switches, are laid and maintained in Fourth street. In the morning of the day of the accident, the plaintiff, with a companion named Oudkirk, went north along Fourth street, to bathe in the river north of it. They *415returned a short time afterwards, and walked for some distance on the platform of a freight house which is on the west side of Fourth street, and north of D avenue, and then started across the street in a southeasterly-direction, in search of a keg of drinking water, which was usually kept in that locality. They crossed several tracks without finding the water, and then continued southward on the street, between railway tracks crossing D avenue. As they approached C avenue, they' saw that it was obstructed by cars which were standing on a track which was west of them; and wishing to reach C avenue at a point west of the standing cars, to avoid them, and when about one hundred feet north of C avenue, they turned in a southwesterly direction. They crossed one of the two tracks which were then west of them, and, in attempting to cross the last rail of the west track at a switch, the plaintiff’s foot slipped ■between the rails and below the balls, and was caught and held so firmly that the plaintiff and Oudkirk could not loosen it. An instant before that occurred, the cars which were in charge of a switching crew were started, the two at the north end were cut off, and propelled northward on thé track in which the plaintiff was caught, and were not stopped until they had passed over the plaintiff’s foot. The petition alleges that the accident was due to negligence on the part of the defendant in the following particulars: In maintaining and operating its track at a place where it did not have the right to do so; in permitting the guard and main rail to be in a worn and dilapidated and unsafe condition, with the opening between them unnecessarily large, without proper safeguards; and in not using due care in switching the car which caused the injury, including the keeping of a proper lookout for danger to persons in the street; in not heeding warnings of the plaintiff’s danger, and obeying signals to stop, in time to avoid the accident.
*416
1
2 I. The evidence tended to show that the space between the guard and main rails where the plaintiff’s foot was caught was wider than was usual or necessary; that it had not been properly filled below the balls of the rails; and that had the space between the rails been of the ordinary width, and filled in part, as it might have been, the plaintiff’s foot could not have been caught, and the accident would not have happened. Fourth street, from O avenue northward, is a public thoroughfare, much used- by pedestrians. There is a walk on the west side,' which was used, however, by but a small part of the people wlm walked along the street. It was narrow, and so near the railway tracks that passing cars would endanger those who used- it. The rights of the people were not confined to the sidewalk, but they were entitled to use all parts of the street in a proper manner, and for proper purposes, subject to the rights óf the railway companies having tracks in it. That is well settled. Bryson v. Railway Co., 89 Iowa, 677; Railway Co. v. Bennett, 9 Ind. App. 92 (35 N. E. Rep. 1033); Railway Co. v. Phillips, 112 Ind. 59 (13 N. E. Rep. 132); Railway Co. v. Head, 80 Ind. 117; Railway Co. v. Pointer, 9 Kan. 620; Railway Co. v. Walker, 70 Tex. 126 (7 S. W. Rep. 831); Elliot, Roads & S. 478; Patterson, Railway Accident Law, section 154; 24 Am. & Eng. Enc. Law, 33. It was the duty of the defendant to maintain and use its tracks and appurtenances with reference to the rights of the public and the use made of the street. To so construct and maintain its tracks, or to so use'them, as to unnecessarily endanger persons who use the street properly, would be negligence; and, in the absence of contributory negligence, the defendant would be liable for resulting damages. Clampit v. Railway Co., 84 Iowa, 72; Smedis v. Railroad Co., 88 N. Y. 20; Frick v. Railroad Co., 75 Mo. 599. The evidence would have authorized the jury to find that the defendant was negligent in *417not haying the guard rail properly placed with respect to the main rail, and in not having the space between them properly blocked.
3
*4184 *417II. At the time of the accident, cars were being switched in Fourth street by an engine and crew of the defendant. The engine was at the south end of a train of eight or ten cars, the north end of the train being in C avenue. When the plaintiff stepped between the rails of the track on which he was hurt, the engine was moved so as to start the north two cars which had been cut off from the others northward, towards the plaintiff, on the track he was crossing, at a ■speed of two or three miles an hour. An instant after the cars were started, the plaintiff’s foot was caught. He was then about ninety feet from the cars. One of the switching crew, named Binko, was opposite the middle or south end of the north car, a few feet east of it. Wiley, the foreman of the crew, had cut the cars off, and was standing near the southeast corner of the south car. Zeediek, another member of the crew, was on top of the third car from the north end of the train, or the first one remaining after the ears were cut off. Augustine, another member of the crew, was more than one hundred feet north of the plaintiff. As soon as the plaintiff was caught, he made an outcry. Oudkirk turned, and, discovering his condition, joined in the outcry, and tried to free him. Augustine heard the .cries, and, seeing the plaintiff’s danger, he gave Binko the signal to stop, halloed, gave a second signal to stop, and ran for the approaching cars. He reached them when they were yet several feet south of the plaintiff, but, before he could climb upon and stop them, they had passed over the plaintiff’s foot, although they were stopped within two or three feet of him. A boy who heard the outcry, after waiting a few moments to satisfy himself as to the cause, ran a distance of more than three hundred feet, and reached the plaintiff before the *418north car touched him. It is not shown that any of the men with the train saw the plaintiff before the accident, but the evidence .tends to show that Binko saw Augustine’s signal to stop, and repeated it to the men in charge of the engine, and that the hallooing of the plaintiff, Oudkirk, and Augustine was so> loud as to 'be heard! the distance of a block or more south of where Binko and Wiley were. See Ford v. Railway Co., 69 Iowa, 627. The signal given by Augustine was an emergency signal, and was designed as a direction, not only to stop the train, but also the detached cars. Had there been a brakeman on one of the moving cars, on the lookout for danger to persons on the track, it is clear that the cars- would have been stopped in time to avert the accident. Some of the evidence tended to show that Binko and perhaps others of the crew could have stopped the car after he received Augustine’s signal. We do not say that it was the duty of the defendant to be on the lookout for persons caught in its guard rails, but it was. required to use reasonable care and diligence, in view of the condition of its yard and tracks, and the use which pedestrians rightly made of the street, to prevent accidents. Considering the use made of the street, the positions occupied by employes of the defendant, the distance of the moving cars from the plaintiff, the signals given and outcry made, we are of the opinion that whether the defendant was negligent in not sooner stopping the cars was a question of fact for the jury; and this, we think, is true, even though it be found that the plaintiff was negligent in permitting his foot to be caught by the guard rail. If, after his danger was known to the defendant, it failed to use due diligence to stop the cars and avoid the accident, it would be liable. Sutzin v. Railway Co., 95 Iowa, 304; Orr v. Railway Co., 94 Iowa, 423; and cases therein cited.
*4195 III. It is said that negligence on the part of the plaintiff contributed to the accident, and for that reason he should not recover. Whether he was negligent depends upon all the circumstances of the case. He was not a trespasser upon the street, but was there by right. Until he discovered that the crossing at C avenue, in the direction in which he wished to go, was blocked by cars, he was in a place of safety. When he found the crossing blocked, he attempted to cross the street at a safe distance from a train which was not in motion. He did not know anything of the condition of the guard rail which he attempted to cross, nor did he know anything of the danger of being caught by it. His attention appears to have been drawn to the train which was moved while he was in the act of crossing the track. It is evident that, had he observed the opening formed by the guard rail, he could easily have stepped over it; but in view of the facts stated, and his youth and lack of knowledge, it cannot be said, as a matter of law, that in permitting his attention to be diverted from the place where he was walking, to the train, he was negligent. The defendant, in support of the claim that the plaintiff was negligent, relies upon the rule that a person having two ways of travel is negligent if, without good reason, he leaves the safe for the unsafe way, and cites numerous cases as applicable in this case. Among them are Hansen v. Building Co., 100 Iowa, 672, Ferguson v. Railway Co., 100 Iowa, 783, Ely v. Des Moines, 86 Iowa, 55, which clearly are not in point. The case of O’Laughlin v. City of Dubuque, 42 Iowa, 539, involved the liability of the city for injuries sustained by one who, without reason, left the walks provided for pedestrians, and attempted to cross an icy street, the condition of which he knew; and is readily distinguishable from this. In Cosner v. City of Centerville, 90 Iowa, 33, it appeared *420that the plaintiff knowingly and without sufficient reason attempted to pass over a portion of a sidewalk which he claimed was unsafe, but the condition of which he knew. The case of Thomas v. Railway Co., 93 Iowa, 249, involved an alleged trespass upon the defendant’s right of way. The cases of Merryman v. Railway Co., 85 Iowa, 634, and Masser v. Railway Co., 68 Iowa, 602, also involved trespasses. The plaintiff in Richards v. Railway Co., 81 Iowa, 426, followed, without sufficient reason, a route which he must have known to be dangerous, without making reasonable effort to anticipate and avoid danger. We do not think any of these cases sustain the claim that the acts of the plaintiff constituted negligence in law.
6 IV. The appellant complains of the refusal of the district court to permit the introduction in 'evidence of certain ordinances of the city. As we understand the claim of the appellant, they were intended to show that the defendant’s right to the use of Fourth street was not exclusive. The ordinances did not refer to the defendant, but if it can be shown that it succeeded to' the rights granted by the or dinance, and is subject to the restrictions therein contained, the ordinances would be competent for the purpose stated, as tending to show the rights of the defendant. Whether the ordinances were competent for any other purpose we do not determine.
7 V. Complaint is made of the refusal of the court to permit the plaintiff to show that the narrow walk on the west side of Fourth street was made dangerous by a guard rail which was near, if not in, the walk. In view of the conclusion we reach, it is only necessary to say as to this that if the defendant claims that the plaintiff should have used that way, instead of walking in the middle of the street, he should *421be permitted to show ‘that it was dangerous. We com elude that the district court erred in taking the cast; from the jury, and its judgment is reversed.