Both major political parties are poised to compete in a pair of special elections this spring, offering a test of Bay State voter sentiment early in the Trump 2.0 era.

Three candidates made the ballot for a special election on the North Shore, and two others are considering entering the fray for an open House seat in southeastern Massachusetts.

The elections are the first legislative contests since all 200 seats were up for grabs in November. Democrats will look to capitalize on frustration some voters have with President Donald Trump, while Republicans hope to use November’s outcome as momentum to chip away at the Massachusetts House’s Democratic supermajority.

Beverly City Councilors Hannah Louise Bowen and Todd Rotondo will face off in an April 15 special Democratic primary for the Sixth Essex District last represented by former Rep. Jerald Parisella. Whoever wins that contest will advance to the special general election against Republican Medley Long III, also of Beverly, on May 13.

Long most recently worked as president of the Greater Beverly Chamber of Commerce, and he’s been involved in several community organizations. He raised more than $28,000 toward his House bid so far, according to state campaign finance data. Bowen has raised about $43,700, and Rotondo has raised about $43,200.

Historically, the region has leaned toward Democrats. The Sixth Essex District last elected a Republican to the House, James Henry, in 1990. Nearly 65% of Beverly voters picked Democrat Kamala Harris over Republican Donald Trump in the 2024 presidential election, and the split was about the same in the portion of Wenham that’s part of the Sixth Essex District.

Parisella won reelection in November, but instead joined the judicial branch in January as a District Court judge, leaving the district representing Beverly and part of Wenham vacant for several months.

Another House district covering parts of Taunton and Easton is also vacant following the death of Rep. Carol Doherty in February.

Candidates eyeing the Third Bristol District have until April 1 to submit nomination papers. Two have pulled that paperwork so far signaling their intent to run: Taunton City Councilor Christopher Coute, a Republican, and Mass. Nurses Association Associate Director Lisa Field, a Democrat.

Coute unsuccessfully challenged for the district in 2022, losing to Doherty with about 43% of the vote.

Republicans have established some roots in the southeastern Massachusetts area. Shaunna O’Connell, who immediately preceded Doherty in the House, serves as mayor of Taunton. Republican Kelly Dooner of Taunton in November flipped a Senate district that had been held for decades by Democrat Sen. Marc Pacheco before his retirement. And several -- but not all -- of the neighboring House districts are held by Republicans as well.

Harris won Taunton, part of which is in the Third Bristol District, but by a much narrower margin than the state as a whole, securing about 49.8% of the vote in the city. The Democrat did better in Easton, where she earned 55.8% of the vote.

The special primary election will take place May 13, and the special general will occur June 10.