OPINION OF THE COURT
John W. Sweeny, J.On March 24, 1978, the infant plaintiff was injured when she allegedly fell into a hole located between railroad tracks at a point where they cross Chestnut Avenue in the City of Middletown. When plaintiffs brought suit against the city and the Middletown & New Jersey Railway Co. (Railroad), the defendant Railroad commenced a third-party action against the Town of Wawayanda based on an alleged 1960 maintenance and indemnification agreement.
The agreement has its foundation in a written instrument whereby the Railroad conveyed to the town an easement for highway purposes at the crossing in question. As a condition of the easement, the town was obligated to maintain the crossing in proper condition as a public highway. No specific reference is made in this document to any rights of indemnification. However, the Railroad relies on the prior correspondence of the Railroad’s counsel in which he suggests that either the town or one Amchir "deliver a proper undertaking that either Amchir or the Town will be responsible for any occurrences due to their negligence.” It does not appear in the record whether this suggestion was ever acted upon or whether the town officially accepted any of the provisions of the conveyance.
Sometime after this conveyance the crossing in question became part of the Village of Amchir upon the latter’s incorporation. The village was in turn annexed by the City of Middletown in 1966.
Cross applications are now before the court for orders disposing of the third-party action and the cross claims of the defendants.
The primary obligation for maintenance of a highway railroad crossing falls upon the railroad. Section 21 of the Railroad Law provides that, "In all cases” the railroad "shall * * * maintain” the crossing. By the provisions of section 51 of the Highway Law, the State Legislature made a railroad *744primarily responsible for crossing maintenance. Thus, by statute as well as at common law (cf. Durr v New York Cent. & Hudson Riv. R. R. Co., 184 NY 320; 4C Warren’s Negligence, Railroad Crossings, §§ 3.01, 3.03), primary responsibility for maintenance of a highway crossing falls upon the railroad.
The attempt by the Railroad to divest itself of this obligation runs contrary to the provisions of these enactments as well as those of section 92 of the Railroad Law which direct a municipality to make an outright purchase or to condemn an easement over an existing railroad.
Therefore, whether or not the town’s attorney was authorized to act as an agent to negotiate and bind the town to the alleged 1960 agreement, it is the opinion of this court that the town lacked the authority to obligate itself to perpetually maintain and accept responsibility for a railroad crossing. Although such an agreement would be permissible between a railroad and a private entity (cf. Salamy v New York Cent. System, 1 AD2d 27), it should not be binding on a municipal entity or its successors in interest (Huth v Southern Pacific Co., 417 F2d 526).
Assuming, for the sake of argument, that part or all of the terms of the alleged agreement were valid when made, it is beyond cavil that the Railroad has waived any right to enforce these provisions against the town since it has apparently either maintained the crossing itself or accepted the City of Middletown’s work in substitution for that of the town for at least 12 years before the accident in question (cf. 42 NY Jur, Novation, §§ 13, 17). Therefore, in any case, there is no basis in fact to impose a duty upon the town.
Accordingly, the third-party complaint against the Town of Wawayanda and the second cross claim by the Railroad against the City of Middletown which is based upon this alleged agreement are hereby dismissed.
However, since all the facts are not before the court and since a municipality which has elected to repair a crossing (Highway Law, § 51) must, as a volunteer, exercise care and be liable for injury from its failure to do so (65 CJS, Negligence, § 4[4]), the first cross claim of the Railroad against the city shall not be dismissed.