MA Gen L ch 53 § 48 (2021)
2021 Massachusetts General Laws|Part I - Administration of the Government|Title VIII - Elections|Chapter 53 - Nominations, Questions to Be Submitted to the Voters, Primaries and Caucuses|Section 48 - Nomination Papers; Certificates of Nomination; Filing; Political Party Membership; Term Limits

Section 48. Nomination papers of candidates to be voted on at presidential primaries except candidates for state, ward and town committees, shall be filed with the state secretary on or before the first Friday in January preceding the day of the primaries.  Nomination papers of candidates for election to state, ward and town committees at presidential primaries shall be filed with the state secretary on or before the third Tuesday in November of the year preceding said presidential primaries.  All certificates of nomination and nomination papers of candidates for the office of state representative, state senator, executive council, or county office shall be filed with the state secretary on or before the last Tuesday in May of the year in which a state election is to be held. Certificates of nomination or nomination papers for the office of senator in congress, representative in congress, governor, lieutenant governor, attorney general, treasurer and receiver general, state auditor and state secretary, shall be filed on or before the first Tuesday in June of the year in which a state election is to be held. In the case of primaries before special elections, such nomination papers shall be filed on or before the fifth Tuesday preceding the day of the primaries. The state secretary shall forthwith issue to the candidate or other person filing such nomination papers a certificate acknowledging the time and date of the receipt thereof.  There shall not be printed on the ballot at the state primary the name of any person as a candidate for nomination for any office to be filled by all the voters of the commonwealth, or for representative in congress, governor's councillor, senator in the general court, representative in the general court, district attorney, clerk of court, register of probate and insolvency, register of deeds, county commissioner, sheriff, or county treasurer, unless a certificate from the registrars of voters of the city or town wherein such person is a registered voter, certifying that he has been enrolled as a member of the political party whose nomination he seeks throughout the ninety days prior to the last day herein provided for filing nomination papers with the state secretary, is filed with the state secretary on or before such filing deadline. Said registrars shall issue such certificate, signed by a majority thereof, forthwith upon request of any such candidate so enrolled or of his authorized representative. Said registrars of voters shall issue such certificate to any person seeking the nomination of a political party, who is a newly registered voter of that city or town enrolled in that political party and who has not been an enrolled member of another political party during the year preceding the last day for filing nomination papers with the state secretary. No such certificate shall be issued to any person who is a candidate for nomination for any such office, if such person has been an enrolled member of another political party during the year prior to the last day for filing nomination papers with the state secretary as provided by this section.  There shall not be printed on the ballot at the state primary or state election the name of any person as a candidate for nomination or election for any office to be filled by all the voters of the commonwealth, or for representative in congress, governor's councillor, senator in the general court or representative in the general court, if said person: (a) is a candidate for the office of Governor, Lieutenant Governor, Secretary, Treasurer, Auditor or Attorney General who, by the end of the then current term of office will have served, or but for resignation would have served, for two consecutive terms in that office within the eleven year period immediately preceding the end of the then current term of office; (b) is a candidate for the office of governor's councillor, senator in the general court, representative in the general court, or representative in congress from Massachusetts who, by the end of the then current term of office will have served, or but for resignation would have served, four consecutive terms in that office within the nine year period immediately preceding the end of the then current term of office; or (c) is a candidate for the office of United States Senator from Massachusetts who, by the end of the then current term of office will have served, or but for resignation would have served, two consecutive terms in that office within the seventeen year period immediately preceding the end of the then current term of office. For the purpose of this section, (i) any person elected or appointed to the office of governor, lieutenant governor, secretary, treasurer, auditor, attorney general, representative in the general court, senator in the general court, representative in congress or United States Senator from Massachusetts who serves more than one-half of a term in that office, shall be deemed to have served an entire term in that office, and (ii) any person serving in one of the foregoing offices as of January 15, 1995 shall be deemed to be serving his first term in that office.