Across the nation, there has been a surge in female candidates putting their names on the ballot to run for public office, including several state and congressional races in Massachusetts, which is receiving positive feedback from local women.

Despite being traditionally dominated by men, more than a dozen women from Massachusetts were seeking their party’s nominations for seats in the U.S. Senate and House of Representatives in the primary last week leading up to the midterm election in November. Six women from the Bay State have been selected for seats on Capitol Hill, according to the state Elections Division.

From 1988 through 2016, three congressional seats have been held by women — U.S. Sen. Elizabeth Warren and U.S. Reps. Niki Tsongas, D-Lowell, and Katherine Clark, D-Melrose. Warren was the first woman elected U.S. senator in the state’s history.

Despite past political patterns, the state and Greater Newburyport have seen an increase in women running for several positions, including a state Senate seat in the First Essex District now held by Sen. Kathleen O’Connor Ives, D-Newburyport, and three state representative seats, including those held by Rep. James Kelcourse, R-Amesbury, and Rep. Lenny Mirra, R-West Newbury.

“I think that it’s a really important value for society,” said Ann Dykes, who is running the state representative campaign for Amesbury resident Jennifer Rocco-Runnion. She is running against Kelcourse as the Democratic nominee.

“I think men and women approach things with different viewpoints and I think balance is really important from the ground up,” Dykes said.

O’Connor Ives, who has served three terms as state senator, is not seeking re-election. Her seat is sought by Rep. Diana DiZoglio, D-Methuen, and former Boxford Board of Assessors member Alexander Williams, who is running as a Republican.

Kelcourse, elected in 2014, represents Newburyport, Salisbury and Amesbury. Rocco-Runnion made a good showing in the primary and received 3,538 votes on the Democratic ballot while Kelcourse racked up 2,088 votes on the Republican ballot. 

Mirra, who represents Boxford, Georgetown, Groveland, Merrimac, Newbury and West Newbury, is facing newcomer Christina Eckert of Boxford, who won the Democratic Party’s nomination. She co-founded the Masconomet Education Foundation in 2010 and is on leave from Community Giving Tree, a nonprofit organization.

Incumbent Rep. Brad Hill, a Republican from Ipswich, is facing newcomer Allison Gustavson, a Democrat from Manchester-by-the-sea, in a district that also includes Rowley, Hamilton, Topsfield and Wenham.

Dykes said there is always a natural advantage for the incumbent that the newcomer, whether a man or woman, needs to overcome. She said being a woman makes this hurdle all the more challenging.

“When you’re a woman, even with the surge in women candidates, male candidates are still out-fundraising women,” Dykes said. “There’s just a built in misogyny in our society that you can’t help but notice. ... There are definitely times they don’t mean it, that it’s not malicious, it’s just there.”

Afroz Khan, a Newburyport city councilor at large, said women often have to prove themselves because of their gender.

In addition, people voting for women running for public office tend to have to explain why they’re voting for the female candidate, said Khan, who added that she hopes people will vote for candidates such as DiZoglio or Rocco-Runnion based on their merits and not their gender.

“I do think that having met them, I hope people don’t look at this from a gender perspective, but how you want to get things done,” she said. “That was something I’m really impressed with and it’s something I’m very eager and excited about.”

Dawne Shand, who is organizing a Greater Newburyport committee for the Massachusetts Women’s Political Caucus, argued that she’s never heard a single candidate ask for a vote solely because she was a woman.

Dykes agreed, noting that it’s public service that resonates with people rather than gender. There are, however, certain issues revolving around women that Dykes believes only they can respond to effectively.

“I’ve seen female candidates speak with great urgency and intelligence on the need to address sexual harassment in the workplace and inequality in pay,” Shand said. “I’ve heard them speak out for women’s health. They are talking with candor about the reality of women’s lives. We need to hear their voices as policymakers, not just advocates.”

Although there is no one explanation for the rise in the number of women in politics, Khan said people are eager to be involved. She noted that she’s seen this change not only among women but across all groups of people.

“I think it’s because people are recognizing maybe in a good way, I hate to say it, that our current president has shown you don’t already have to be someone who has immigrated into a political background,” Khan said. “You could step in and learn, so why not jump into it?”

Despite this, some local women, including Shand, believe the 2016 presidential election created a greater awareness about the absence of and urgent need for more women in public life at every level of government.

“The women who have stepped forward to run in Essex County did so because they believed it was their obligation as citizens to speak out on issues of grave importance — environment, education, economic equality,” Shand said. “I think we’re also seeing a groundswell of support for them because they are such strong candidates.” 

In addition to the races on the North Shore, five women — Lori Trahan, Barbara L’Italien, Juana Matias, Alexandra Chandler and Bopha Malone — campaigned as Democrats for the 3rd Congressional District seat formerly held by Tsongas.

After the primary last week, Trahan held a slim margin and was declaring victory in the Democratic primary, but Secretary of State William Galvin is overseeing a recount of votes. 

Staff writer Amanda Getchell covers Newburyport and Seabrook. Follow her on Twitter @ajgetch.