If a vacancy occurs in the office of mayor by death, removal or resignation at any time during the first year of the term ending December thirty-first, the city clerk shall forthwith order an election to fill such vacancy for the remainder of the unexpired term.
If a vacancy occurs during the second year of the term beginning January first, a meeting of the city council shall be called by the city clerk and the city council shall elect by majority vote one of its members as mayor for the remainder of the unexpired term. If the city council fails so to elect at said meeting or within thirty days thereafter, the president of the city council shall become acting mayor, shall exercise all the rights and powers of mayor and shall be sworn to the faithful discharge of his duties.
If a vacancy occurs at any time in the office of a councillor elected by and from the qualified voters of the city, such vacancy shall be filled forthwith by a majority vote of all the remaining members of the city council for the remainder of the unexpired term.
If a vacancy occurs, before the last six months of the term, in the office of a councillor elected by and from the voters of a ward, the city council shall forthwith order an election to fill such vacancy for the remainder of the unexpired term.
Mass. Gen. Laws ch. 43, § 59A