Upon petition of the county commissioners, the court of common pleas may vacate as a county road any portions of any abandoned or condemned road, or any portions of any road purchased by the county, or of any road, the permanent location or improvement whereof has been ordered or made under this or former acts relating to county roads. All portions of such roads so vacated shall become and be township roads, if located within a township, or shall become and be borough or city roads, if located within a borough or city. Written notice of the contents of said petition and the time when the same will be presented to the court shall be given by the county commissioners to the supervisors or commissioners of the township or townships or to the council of the borough or city through which said road passes, at least ten days before the date of presenting the same. At the time said petition is presented, the court may fix a time for hearing in open court, or may refer the matter to an examiner to take testimony and report his findings to the court at such time as the court shall direct. At any hearing in open court or before an examiner appointed by the court, all parties in interest may appear and be heard. After such hearing, the court, if it shall find that the conditions prescribed by this act have been complied with, may grant the prayer of the petitioners and make a decree accordingly or make such order in the premises as it deems right and just. No order of vacation shall be made until the township, borough or city affected shall have consented thereto by an ordinance or resolution certified to the court.
16 P.S. § 5909