When a railroad company shall not properly construct and maintain the bridges or other crossings which cross, or are crossed by, highways, whenever the bridges or crossings were originally constructed by, or are owned by, the railroad company, the governing body of the county or municipality wherein such crossings are located may, within a reasonable time, after notice to the company, construct or repair such bridges or other crossings, and the cost thereof may be collected from the company whose duty it is to make such construction or repair, by action in a court of competent jurisdiction.
In lieu of such construction or repair the county or municipality may proceed by suit in equity to compel the specific performance of the duties imposed by law upon the company with respect to the construction, maintenance and repair of such bridges and crossings. The court shall prescribe the crossing to be constructed or the repairs to be made.
In order to enforce obedience to its decree or mandate, the court may restrain the exercise of any of the franchises of the company or adopt other remedies in accordance with the practice of the court.
N.J.S. § 48:12-52