Whenever a state, county, municipal or other street or highway, including a highway that may be designated as a part of the federal aid highway system, which may be constructed or reconstructed in such manner that it crosses or intersects any railroad, the state transportation commission, or other governing body, may, if in its opinion it is practicable and reasonably necessary for the protection of the traveling public, separate the grades at such crossing and, if unable to agree with the railroad as to the grade separation and the method of accomplishing the separation, may apply to the district court of the county in which the separation is located by verified petition praying for the separation of grades at the crossing and shall accompany the petition with plans and specifications of the proposed grade separation. The procedure on the petition shall be the same as in ordinary civil action. If the court determines in such proceeding that the grade separation is practicable and reasonably necessary for the protection of the traveling public over the highway, it shall order the grade separation to be made, either in accordance with the plans and specifications filed with the petition or in accordance with such modification of the plans and specifications as the court determines to be proper, and upon condition that the then existing grade crossing shall be closed to all forms of street or highway traffic upon the completion of the grade separation. The orders of court in such proceedings shall be enforced in the same manner as decrees in equity. When any separation of grades is made either by agreement or by court order, the railroad company shall pay not to exceed ten percent of the cost between the grade separation limits, provided that the then existing grade crossing shall be closed to all forms of street or highway traffic upon the completion of the grade separation and provided that where funds are made available for such purposes under the provisions of the act of congress known as 23 USCA 101 et seq., as amended and supplemented, the participation of the railroad company in the cost of construction and maintenance of any grade separation structure and the approaches thereto shall be in conformity with and subject to the provisions of that act. In cases where two or more railroads are located in such proximity to each other as to be involved in any single separation of grades, the portion of the cost of the grade separation shall be apportioned between the railroads either by agreement or in such manner as may be just by order of court in such proceeding. Whenever the plans and specifications for a grade separation, as finally fixed by agreement or order of court, provide for raising or lowering the grade of the railroad tracks, the cost shall be included in the cost of the grade separation.
NMS § 63-3-37