For voters in cities surrounding the Greater Boston area, this year's election cycle meant sustaining legacies, creating change, making history, and speaking as a community. Here is a look at four of Tuesday's noteworthy elections in Middlesex and Essex counties.

Salem mayor gets four more years 

In Salem, incumbent mayor Kim Driscoll, who first took office in 2005, was re-elected for the third time. Voters also supported a ballot question on a controversial ordinance on immigration policy.

Driscoll won re-election with 66 percent of the vote over former City Councilor Paul Prevey. Driscoll is a supporter of the city’s so-called Sanctuary for Peace ordinance, which was also on the ballot. The ordinance says city employees, except police officers, shall refrain from inquiring about immigration status. Driscoll said that doesn’t make Salem a sanctuary city, but Prevey argued the ordinance could lead to Salem losing federal funding. Tuesday's referendum on the ordinance divided voters — 57 percent of them said they approve of it, compared to 43 percent who would have liked to have seen it repealed. 

Lynn opts for change

In Lynn, incumbent mayor Judith Flanagan Kennedy was defeated by State Sen. Thomas McGee. 

McGee’s win was a convincing one — beating Flanagan Kennedy 65 percent to 35 percent. Flanagan Kennedy is a conservative Republican who has said Central American immigrants were draining city resources. McGee is a Democrat who served four terms in the state House of Representatives before being elected to the Senate in 2002, where he currently serves as the co-chair of the Legislature’s transportation committee. 

Newton elects its first woman mayor

In one of the tighter races of the day, voters in Newton elected their first-ever woman mayor. City Councilor At-Large Ruthanne Fuller edged out City Council President Scott Lennon. Fuller will replace mayor Setti Warren, who stepped down to run for governor.

With more than 24,400 votes cast in Newton, the difference came down to less than 350 votes. The race became a more heated one, focused on class and gender roles, after one of Lennon's ads emphasized he was the only candidate who’d continuously held a full-time job; Fuller stopped working full time to raise her now-grown children. Voters also rejected a controversial ballot proposal that would have cut the number of city councilors in half — from 24 to 12 — and would have changed the system so councilors would be elected by citywide vote, rather than from within local wards. 

Lowell unites to preserve its downtown high school

The election in Lowell came down to one issue: whether to renovate the city's existing high school, or build a new one on the edge of town. 

A proposal to build a new high school in Lowell’s leafy Belvidere neighborhood became a heated topic of debate in the city, and was soundly shot down by voters Tuesday. In a referendum on the subject, 61 percent of voters supported renovating the current downtown high school, compared to 39 percent who wanted the new school built. The issue divided candidates on the City Council and school board elections. The Lowell Sun reports that seven of the nine city councilors who were elected favor a downtown high school, as well as five of six school committee members.