Sarah Elfreth woke up the day after President Donald Trump’s election and realized all of the people representing her in government — from Annapolis city council and the Maryland legislature to Congress and the president — were men. She vowed then to run for office.

Two years later, after knocking on some 12,000 doors, Elfreth, 30, was elected to represent Anne Arundel County in the state Senate. The Democrat will join the largest contingent of women lawmakers in the General Assembly’s history, according to an analysis by its women’s caucus.

Seventy-one women won election to the Maryland legislature Tuesday — about 30 of them new to the House and Senate — as part of a surge of successful women candidates across the country that shattered glass ceilings for gender, race and religion.

Overall, Maryland will see a net gain of seven more women when the legislature reconvenes in January. And the increase in female representation is not only in the State House: the Anne Arundel County Council went from having no women to a majority, Prince George’s County elected its first female executive and Carroll County sent a woman for the first time as a judge on its Circuit Court.

“I hate the term ‘pink wave’: This is less of a wave and more of a righting of the ship,” Elfreth said. “This is just righting that balance more than anything else.”

Advocates say electing more women to office did not happen by accident. National and local organizations such as Emily’s List, She Should Run and Emerge Maryland have been recruiting, training and helping women organize. That pipeline contributed to a boom in women running for office. Others also point to Trump’s election and the Women’s March movement — which rallied hundreds of thousands on his first day in office — as inspiring more women to file as candidates.

“Our democracy is stronger when diverse perspectives are represented,” said Martha McKenna, who founded Emerge Maryland. “We should have as many moms as we have dads in the legislature and as many women as men. Our representative democracy is stronger if it is actually representative.

“Women’s life experiences and perspectives are valuable in policy making.”

Despite Tuesday’s gains, men still dominate elected office across the state.

Maryland has no women in its congressional delegation, and 63 percent of its state legislators will be men. Men will continue to hold the executive’s office in each of the counties that surround Baltimore City. The Harford County Council is all male, as is the board of commissioners in Carroll County. Just three of 15 members on the Baltimore City Council are women. The Baltimore County Council will have one female member of seven when the new term starts.

The state has many glass ceilings still intact. No woman has ever been elected governor, and the powerful House speaker and the Senate president positions have always been held by men.

McKenna said that while more needs to be done to reach parity between the sexes, she sees the network of women running for office in Maryland — and supporting one another as they run — growing exponentially. She said women are encouraging each other to file, volunteering for each other’s campaigns and helping one another raise money.

“It’s leadership,” McKenna said, “If you want to run, let’s do it together and let’s organize.”

When women run for office they have as much a chance of winning as men do, said Katie Fischer Ziegler, a program manager at the National Conference of State Legislatures. She analyzes data about gender in politics for the organization’s Women's Legislative Network. The pool of female candidates for office has historically grown very slowly, but Tuesday’s election victories are a sign of the cumulative effect nationally.

A record number of women will serve in Congress. More than 100 were elected to the House of Representatives this week as far more women ran. Among them are two Latinas from Texas, two Muslim women from Michigan and Minnesota, a lesbian Native American from Kansas and African-American women from Connecticut and Massachusetts — all firsts for their states.

Women had previously never held more than 84 of the 435 seats in the House.

In state legislatures, Ziegler said more women will be serving than ever before. A preliminary analysis shows nearly 2,075 women will occupy seats in the 50 legislatures, an increase of more than 190 from the 2018 session, she said. That means women will be 28 percent of all state legislators, an increase of 3 percent.

Ziegler said the last time state legislatures saw this number of women win election was 1992. It is still known as the “Year of the Woman,” when the percentage jumped from about 18 percent to about 20 percent, she said.

Going into 2019, Nevada will have the highest percentage of women legislators — more than half, Ziegler said. But Maryland’s share of women legislators puts the state among the top for female representation.

With 71 of the 188 seats in Maryland’s House and Senate to be held by women, they will make up 38 percent. Sixty-one of the 71 are Democrats.

The women’s caucus analysis shows that the highest number of female legislators previously — 67 — served during the 2005 and 2006 sessions.

Del. Sheree Sample-Hughes, president of the women’s caucus, said when women serve in office they contribute key perspectives on topics from quality child care to the economy. She pointed to the work of women legislators in the passage of a bill that increased the buying power of state-backed child care vouchers, as one example. Data show women are more likely than men in elected office to advocate for policies involving health care, education and an assortment of family matters.

“When we support a policy, it does make a difference,” said Sample-Hughes, a Democrat who represents Dorchester and Wicomico counties.

In the upcoming session, priorities for the caucus include supporting women veterans and family caretakers and ensuring they have economic security, Sample-Hughes said.

Elfreth said the legislation she will advocate for in Annapolis will be reflective of the feedback she gets from the people who live in her district. From the health of the Chesapeake Bay to strong early education, what matters to the public are not “female” or “male” issues, she said.

But no matter the topic, Elfreth said, her perspective will always be shaped by being a woman. And bringing a diversity of experience has the power to change the state for the good, she said.

The words she heard during a lecture about women in office as a Towson University undergraduate ring in her ear: “If you’re capable and you’re passionate, it’s your obligation to run for office,” Elfreth said. “That has stuck with me for a very long time.”

Baltimore Sun Media Group reporters Christine Zhang and Michael Dresser contributed to this article.

ywenger@baltsun.com

twitter.com/yvonnewenger