Plaintiffs appeal from a summary judgment granted the defendant City of Huntsville. This court reverses and remands the trial court’s action.
The motion for summary judgment was before the court based on the complaint, affidavits of plaintiffs Terry and Renee Isbell and an affidavit given by Woolsey Finnell, Jr., the Engineer of Public Works for the City of Huntsville.
The facts which can be gleened from these moving papers are best highlighted by the affidavit of plaintiff Renee Isbell which reads in part:
“At approximately 8:20 p. m. on August 29, 1974, I was a passenger in an automobile being driven by my husband on 5th Street in the City of Huntsville, *382Madison County, Alabama. We were in the process of traveling from our apartment to the home of our parents. It was raining and the roads were wet. We were approaching what appeared, at a distance, to be a railroad crossing. I could not tell that 5th Street did not cross a railroad tracks. There were not any traffic control signs of any kind to warn us that 5th Street did not cross the railroad tracks. There were no barricades or guard rails to warn an automobile driver that 5th Street did not continue across the railroad tracks. We were traveling within the speed limt. By the time we were close enough to see that 5th Street did not cross the railroad tracks, it was too late to stop our automobile. Our automobile collided with the railroad tracks and with the gravel and dirt on either side of the railroad tracks.”
Based on the facts set out in the affidavits, it appears that plaintiffs were faced with an illusion created by the proximity of the street upon which they were driving to the railroad tracks of defendant railroads. The rainy weather conditions and the sharpness of a right turn in the road allegedly prevented plaintiffs from perceiving that the road did not cross the tracks until too late to prevent their leaving the road and hitting the tracks.
The complaint was originally filed by plaintiffs against “Southern Railway Company, a corporation, L & N Railroad Company, a corporation, and the City of Huntsville, Alabama, a municipal corporation.” In the complaint, plaintiffs first charged the city with liability for its “neglect, carelessness [or] failure * * * to remedy some defect in the streets, alleys or public ways * * * after the same had been called to the attention of the Council of the City of Huntsville, * * * or after the same had existed for such unreasonable length of time as to raise a presumption of knowledge of such defect on the part of the Council.”
The complaint then charged negligence on the part of defendant railroads for allowing or permitting “a situation to exist so that it appeared to a motorist that 5th Street located in the City of Huntsville, Alabama, crossed the railroad tracks owned and operated by these defendants” and for failing “to properly maintain their railroad tracks * * *.”
The defendant railroads were subsequently dismissed from the suit on plaintiffs’ motion after a settlement agreement was reached between plaintiffs and railroads and pro tanto releases executed. The city moved for summary judgment, citing/Title 37, §§ 502-03 of the Alabama Code, and the trial court granted the motion. The issue before this court on appeal is whether the trial court’s action in granting the motion was correct.
The language used by plaintiffs in their allegation of liability against the City of Huntsville is taken directly from Title 37, section 502, Code of Alabama (Recompiled 1958) ,1 The liability created by this statute was thoroughly delineated by this court in the case of City of Birmingham v. Carle, 191 Ala. 539, 68 So. 22 (1915). In his opinion, Justice McClellan described *383this statute as establishing two classes of liability:
“In the first class (a) are wrongs or injuries resulting from negligence of agents, etc., of the municipality, consistent with the doctrine of respondeat superior; and in the second class (b)' are wrongs or injuries for which the municipalities are only liable for culpable neglect to remedy a condition negligently created or made or allowed to exist by a person or corporation not related in service to the municipality — a stranger to the municipal service or function.”
191 Ala. at 542, 68 So. at 23.
The opinion also describes the requirements of section 503,2 which must be read in pari materia with section 502:
“[Section 503] requires that, where the municipality is sued, the person or corporation within the second class (b) defined in section [502] shall be joined as a defendant, unless on appropriate demand the name of the so culpable person or corporation (stranger to the municipal service or function) is not furnished by the mayor within ten days after the demand ; and an additional requirement and method for the joinder of such person or corporation is provided, where it develops that a person or corporation, within the second class (b) defined in section [502], liable for the consequences of his or its culpable wrong, should have been originally joined as a defendant; and the plaintiff’s failure to amend, so as to bring in such person or corporation as a defendant requires the nonsuiting of the plaintiff.
“There is further provision in that statute (section [503]) forbidding the rendition of judgment against the municipal defendant under certain circumstances. According to this statute (section [503]),. the circumstances under which judgment cannot be rendered against the municipal defendant alone are these: Where it is shown that the injury or wrong for redress of which the plaintiff sues was the proximate result of a defect created or existing by reason of the negligent act or omission of a person or corporation not related to the municipal service or function and for the culpable failure of the municipality, to remedy which defect the municipal defendant is made only solely jointly liable with such culpable person or corporation, unless .there .have been no service upon the person or corporation so initially culpable in the premises, or unless the judg*384ment is rendered in favor of such-person or corporation on some personal defense interposed by such person or corporation. The manifest legislative purpose was to prevent the rendition of judgment against the municipality for culpable neglect in respect of a condition not initially created by it, but for the negligent failure to remedy which it is made liable. In other words, where a defendant, within the description of the second class (b) of section [502], is joined with the municipality as a defendant and served with process, judgment against the municipality alone cannot be rendered, unless the person or corporation, whose primary culpable act or omission give rise to and affords the essential basis for the municipal neglect to remedy the defect, as defined, is also adjudged liable, provided the liability of such person or corporation is not averted by some personal defense.” (Emphasis added).
191 Ala. at 542-43, 68 So. at 23-24. In City of Birmingham v. Corr, 229 Ala. 321, 323, 157 So. 56, 57 (1934) the court stated:
“These statutory provisions are limited to cases where the injury results from the initial wrongful act of some third person for whose acts the city is not responsible under the doctrine of respondeat superior, and the city’s liability arises from negligent failure to remedy the conditions created by such third person.”
See City of Anniston v. Hillman, 220 Ala. 505, 126 So. 169 (1930); City of Birmingham v. Norwood, 220 Ala. 497, 126 So. 619 (1930); City of Decatur v. Gilliam, 222 Ala. 377, 133 So. 25 (1931).
In their allegation of negligence against the city, the plaintiffs use the language of section 502 which has been construed to establish the second class of liability. But based on the facts set out in their affidavits, their complaint could be interpreted to allege that their injuries were in fact proximately caused by the negligence of the city in failing to warn them of a dangerous condition near the roadway. Under this interpretation, section 503 requirements would only apply if, on the trial of the case, the jury determined that the dangerous condition was initially created by a wrongful act of the railroad. Cooper v. City of Fairhope, 263 Ala. 619, 83 So.2d 321 (1955); City of Montgomery v. Ferguson, 207 Ala. 430, 93 So. 4 (1922).
The complaint in the case of Cooper v. City of Fairhope, supra, was drawn in the same language as the complaint in the case before this court.3 There the city alone was named as defendant and the alleged defect was the failure of the city to put up a warning sign or barrier at the end of a street which dead-ended at the bottom of a slope and was abutted by a lot with a house some 20 feet from the street. Even though the court found no liability under the facts of that case, in discussing a city’s duty to place traffic control signs the court stated,
“[I]f a dangerous condition exists outside the street limits but so near thereto that it endangers travel thereon because of the want of protecting barriers, warnings or lights with the probability of injury therefrom, then the city can be held liable.”
263 Ala. at 622, 83 So.2d at 323. Even where the city did not cause the defect, if it was not initially caused by the wrongful act of another then the city has a separate duty to either correct the defect or warn members of the public of its existence. See City of Bessemer v. Brantley, 258 Ala. 675, 65 So.2d 160 (1953).
This conclusion is also supported by the court’s decision in City of Montgomery v. *385Ferguson, 207 Ala. 430, 93 So. 4 (1922). There the complaint was framed in the same language4 as the complaint presently before the court, charging the City of Montgomery for its failure to put up warning signs vhere a street car trestle intersected a railroad cut with a bridge which was narrower then the street itself, leaving an open space of four feet between the trestle and a footbridge that the city maintained nearby. Plaintiff, walking at night, fell through this space, down into the railroad cut, sustaining serious injuries. The city gave plaintiff the name of the street car company and it was joined as a defendant. An affirmative charge was given in favor of the street car company and the city requested a charge that a judgment could not be brought against the city alone under certain conditions because of section 503. Denial of this charge was upheld by this court in the following language :
“Under the evidence here, a case of initial negligence on the part of some third person disconnected with the city was not presented. If the defendant receiver was guilty of any negligence at all (a question, as above stated, we are not in a position to review), it would not have been an initial wrongdoer, but at most only jointly and cooperatively negligent with the city, and the statute [Tit. 7, sections 502, 503] would be without application. City of Birmingham, v. Carle, 191 Ala. 539, 68 South. 22, L.R.A.1915E, 797.”
207 Ala. at 433, 93 So. at 7.
A motion for summary judgment may be granted only where the moving papers show that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law. Birmingham Television Corp. v. Water Works, 292 Ala. 147, 152, 290 So.2d 636, 642 (1974); Comments, Rule 56, A.R.C.P. This standard has been interpreted to require that “all reasonable inferences from the facts be viewed most favorably to the non-moving party.” Folmar v. Montgomery Fair Company, Inc., 293 Ala. 686, 690, 309 So.2d 818, 821 (1975).
After a consideration of the pleadings and affidavits before the trial court and in light of the above stated tests for assessing the merits of a motion of summary judgment, it appears to this court that defendant has not met his burden of showing that plaintiffs cannot prevail under any discernible circumstances. See Folmar v. Montgomery Fair Company, Inc., 293 Ala. 686, 690, 309 So.2d 818, 822 (1975). Conceivably plaintiffs could present evidence to show initial negligence on the part of the city. Such proof if believed by a jury would take the case from under the influence of section 503 and would leave a disputed question of fact for the jury to determine regarding the liability of the city. On the other hand, if primary liability of the railroads should appear upon the trial of the case, a directed verdict or judgment notwithstanding the verdict would be proper.
This court finds that summary judgment was improperly granted and therefore reverses.
REVERSED AND REMANDED.
MADDOX, JONES, ALMON and SHORES, JJ., concur. MERRILL, BLOODWORTH, FAULKNER and EMBRY, JJ., dissenting.. “No city or town shall be liable for damages for injury done to or wrong suffered by any person or corporation, unless said injury or wrong was done or suffered through the neglect, carelessness, or unskillfulness of some agent, officer, or employe of the municipality engaged in work therefor; and while acting in the line of his duty, or unless the said injury or wrong was done or suffered through the neglect, carelessness, or failure to remedy some defect in the streets, alleys, public ways, or buildings after the same had been called to the attention of the council, or after the same had existed for such unreasonable length of time as to raise a presumption of knowledge of such defect on the part of the council, and whenever the city or town shall be made liable to an action for damages, by reason of the unauthorized or wrongful acts, or the negligence, carelessness, or unskillfulness of any person or corporation, then such person or corporation shall be liable to an action on the same account by the party so injured.”
. “The injured party, if he sues the municipality for damages suffered by him, shall also join such other person or persons or corporation so liable as defendant or defendants of the suit, and no judgment shall be rendered against the city or town, unless judgment is rendered against such other person or corporation so liable for such injury, except where a summons is returned not found as to a defendant or when judgment is rendered in his favor on some personal defense, and if an action be brought against the city or town alone and it is made to appear that any person or corporation ought to be joined as a defendant in the suit according to the provisions in the preceding section, the plaintiff shall be nonsuited, unless he amends by making such party or corporation a defendant if a resident of the state, but no person shall be sued jointly with the city or town who would not be liable separately, irrespective of this provision. When a judgment shall be obtained against municipality and the other party liable as aforesaid, execution shall issue against the other defendant or defendants in the ordinary form, and shall not be demandable of the city or town unless the other defendants are insolvent, and the same cannot be made out of their property, and the city or town shall pay only so much of the said judgment as cannot be collected out of the other defendants. If the injured party shall, before bringing suit, demand of the mayor of such municipality the name of such other person or persons or corporation as may be liable jointly with the said municipality to such injured party, and if such mayor fail to furnish within ten days from the making of such demand, the name of such person or persons or corporation, so jointly liable, the said injured party shall not be required to join such other person as a party defendant with said municipality in any suit brought to recover damages for such injuries.”
. The language of the original complaint was verified by reference to the original record of the Cooper case.
. The language of the complaint is recorded the beginning of the report of the case in 207 Ala. at 431, 93 So. at 5.