In a negligence action to recover damages for personal injuries, etc., defendant third-party plaintiff appeals from so much of an order of the Supreme Court, Orange County, dated May 21, 1979, as dismissed its second cross claim against the City, of Middletown and dismissed its third-party complaint against the Town of Wawayanda. Order modified by deleting therefrom the provision dismissing the second cross claim interposed by the appellant against the City of Middletown and the second cross claim is reinstated. As so modified, order aflirmed insofar as appealed from, without costs or disbursements. On March 24, 1978 Jennifer Bruno was injured when she fell into a hole located between railroad tracks at a point where they cross Chestnut Avenue in the City of Middletown. The instant action was commenced by service of a summons and complaint against both the City of Middletown and appellant Middletown and New Jersey Railway Company. The appellant thereafter commenced a third-party action against the Town of Wawayanda based upon an alleged 1960 maintenance and indemnification agreement. The agreement had its foundation in a written instrument whereby the appellant conveyed to the town an easement for highway purposes at the crossing. As a condition of the easement the town was obligated to maintain the crossing in proper condition as a public highway, at its own expense. The agreement was drafted by the town’s attorney, signed by the appellant and was thereafter filed with the town clerk. Sometime after this conveyance, the crossing became part of the Village of Amchir upon the latter’s incorporation. Thereafter, in 1966, the village was annexed by the City of Middletown. In addition to the third-party action for indemnity brought against the town, the appellant interposed two cross claims against the City of Middletown alleging that (1) the injuries sustained by Jennifer Bruno were caused by the active and primary negligence of the city and (2) by virtue of the annexation by the city, the latter became liable to fulfill the obligations of the town under the indenture agreement, including the obligation to maintain the crossing and keep it in safe condition, at its own expense. Therefore the injuries sustained were caused by the negligence of the city in failing to maintain the area in accordance with the terms of the agreement. The town moved for summary judgment; the city cross-moved for summary judgment dismissing the cross claim; and the appellant moved for summary judgment dismissing the answer to the third-party complaint and on its second cross claim against *804the city. Special Term dismissed the third-party complaint against the town and the second cross claim interposed by the appellant against the city; however, the first cross claim of the appellant against the city was permitted to stand. While we agree with Special Term that the third-party complaint against the town should be dismissed, we are of the view that the second cross claim interposed by the appellant against the city should not be dismissed. In our opinion the agreement entered into between the town and the appellant was valid from its inception. In consideration for the right of way over the appellant’s property, the town agreed to maintain the crossing in good condition. This undertaking on the town’s part amounted to a purchase of the easement (see Railroad Law, § 92). However, after the annexation by the city, the town no longer had any rights in or control over the streets located within the annexed area; it was then relieved of the obligation of maintaining the crossing situated within such area. We therefore conclude that the third-party complaint against the town was properly dismissed. The cross claim against the city stands on different footing. After the annexation, the city had control of the street intersecting the crossing. Therefore it would be the proper party to look to for performance of the contractual duty of maintenance. Moreover, when the city annexed the territory in question, it acquired all the rights in the real and personal property located in it; consequently it should be obligated to assume the concomitant obligations (see General Municipal Law, §§ 707, 708). We conclude, therefore, that the second cross claim against the city, founded on the maintenance agreement, may stand. Mollen, P. J., Lazer, Cohalan and Gibbons, JJ., concur. [99 Misc 2d 742.]