Section 59. If a public way and a railroad cross each other, and the board of aldermen of the city or the selectmen of the town where the crossing is situated, or the department of highways, if the crossing and its approaches are in direct continuation of a state highway, or the directors of the railroad corporation, or the directors of a railway company having tracks on said way, deem it necessary for the security or convenience of the public that an alteration not involving the abolition of a crossing at grade should be made in the crossing, the approaches thereto, the location of the railroad or way, or in a bridge at the crossing, they shall apply to the board of county commissioners, or, if the crossing is situated, in whole or in part, in Boston, to the department of telecommunications and energy, which shall, after public notice, hear all parties interested, and, if it decides that such alteration is necessary, shall prescribe the manner and limits within which it shall be made, and shall forthwith certify its decision to the parties and to said department of telecommunications and energy. If a state highway and a railroad cross each other and the department of highways, after public notice and a hearing of all parties interested, decides that it is necessary for the security or convenience of the public that an alteration as aforesaid should be made in the crossing, the approaches thereto, the location of the railroad or way, or in a bridge at the crossing, and if no application under the foregoing provisions of this section relative to said crossing is then pending, said department of highways may order such alteration, prescribing in such order the manner and limits within which such alteration shall be made, and shall forthwith certify its decision to the parties and to said department of telecommunications and energy; provided, that a party aggrieved by a decision or order of said department of highways hereunder may appeal to the department of telecommunications and energy in the same manner as in the case of an appeal under section one hundred and eleven of chapter one hundred and sixty by a person aggrieved by a decision or order of the county commissioners, and the provisions of sections one hundred and eleven to one hundred and thirteen, inclusive, of said chapter shall apply to appeals hereunder except that for the purposes of this section, reference in said sections one hundred and eleven to one hundred and thirteen, inclusive, to the county commissioners shall refer to the department of highways.
Hearings by the department of highways shall be held in the county where such crossing is situated and a copy of its decision and of the plan of said alteration shall be filed by it in the office of the county commissioners of the said county. This proceeding may include any case where there is need of the rebuilding of a highway bridge or any structural change or renewal in order to strengthen or improve it. If any railway company is authorized to lay and use tracks upon the said way, the said company shall bear such part of the expense of building, rebuilding, changing, renewing, repairing or improving a bridge forming a part of said way, or of altering or improving the approaches thereto, as the commission provided for in sections sixty-one and sixty-two deem just.