When, by the growth of cities and the opening of incorporated cemeteries in the vicinity thereof, or from other causes, any burial ground belonging to or in charge of any religious society or church, directly or through trustees therefor, has ceased to be used for interments, the courts of quarter sessions of the several counties of this commonwealth, upon petition of the managers, officers or trustees of such society or church, setting forth that the erection, extension or improvement of buildings for religious purposes of such society or church are hampered and interfered with, and the welfare of such religious society or church is injured to the detriment thereof and of the public good, and after four weeks' advertisement of hearing in open court for the purpose, may, after a full hearing of the parties therein, proofs and allegations, authorize and direct the removal of the remains of the dead from so much of such burial ground as may be needed for buildings for religious purposes only by the managers, officers or trustees of such society or church: Provided, That no such application shall be made by the managers, officers or trustees of such society or church, except in pursuance of the wishes of a majority of the members of such society or church, expressed at a church election held for that purpose after two weeks' public notice.
9 P.S. § 41