Andrea J. Campbell, a former Mattapan City Councilor who made a city-wide reputation for herself with a spirited but ultimately unsuccessful run for mayor of Boston in 2020, jumped into a much bigger political league Tuesday night when Massachusetts voters elected her Attorney General, the first Black woman to hold that constitutional office.

The time-lapse from relative obscurity to the political high wire: seven years.

Campbell, 40, who was first elected to the Boston City Council in 2015, told a boisterous crowd of supporters at the Fairmont Copley Plaza victory celebration that she dedicated the historic win to the marginalized.

“For those of you who have felt unseen, this victory is for you,” she said, her husband Matthew Scheier beside her. “For those who have felt left out and left behind and undervalued. This victory is for you. Thank you.”

Campbell, who kicked off election morning by casting her vote at the Lower Mills Library in Dorchester, reflected on her ten-month campaign, saying: “I didn't run to be the first, but it's not lost on me what this means, not only for Massachusetts, but for our nation.

“We say representation matters, when we win tonight, and I'm going to put it out there because we're going to work hard to win, I know what it means for every little girl, or anyone who feels left out and left behind and doesn't envision themselves taking on some leadership role, especially coming from a tragic upbringing."

Campbell lost both of her parents relatively early in life and her twin brother died while awaiting trial in state custody. She attended Boston Public Schools, including Boston Latin School, before going on to Princeton University and UCLA School of Law.

After returning home to Boston, she spent a year serving in Governor Deval Patrick’s administration as deputy legal counsel, then launched her career into elected public service.

Campbell’s rise through the political ranks was powered, in part, by a hardcore group of hometown voters who have supported her since her first run for public office. Many of them greeted Campbell as she arrived to vote at her local library on Tuesday.

“It was almost like a relay,” said Haroon Roshid, an African-American man who said Campbell was “a great politician” when she represented his neighborhood. “She went from one [office] to the other and I support her for that.”

Roshid, 75, added he found her willingness to run another race after the mayoral loss commendable.

“If you’re a leader and you feel as though your message means something, then you don’t quit just because you didn’t win a position, you seek to be in a place where you can be accountable."

Robert Jenkins, a self-professed day-one Campbell supporter, was hopeful her background as a working class Bostonian would inform her decision making as she wields the power of attorney general.

“She’s one of us. She understands the struggles that people have,” Jenkins, 62, said. “Now she’ll be the third most powerful woman in the state after the Governor and Lieutenant Governor.”

Campbell has said her priorities as attorney general would be to “stress what the office can do” in the areas of housing, the well-being of children and mental health — themes echoed in her victory remarks.

We will protect our children by prioritizing their mental health and working to ensure our children have access to behavioral health services, a high-quality education, and are protected against discrimination and bullying," Campbell said.

"We will provide greater economic opportunity, tackling wage theft, protecting our elders and our seniors against predatory practices and scams," Campbell continued. "We will remove barriers to affordability, giving our families the tools they need to buy and stay in their homes, allowing for upward mobility and opportunity, protecting tenants and homeowners alike and taking on companies who jack up our prices and charge us too much money.”

State senator Lydia Edwards, a former city council colleague of Campbell’s, said those anxious to know how Campbell works need look no farther than the Office of Police Accountability and Transparency. Though signed into effect by former mayor Marty Walsh and staffed through the appointments of current mayor Michelle Wu, the legislation that birthed that office was conceived by Campbell.

“That was her idea. Period,” said Edwards, who is also a fellow Black woman attorney. “That’s how I know she’ll be a good attorney general,” she continued, noting that Campbell thinks critically about how systems work and fail.

“Her job now is to have vision and to implement and she’s already done that,” Edwards added.

Other supporters like Brian Ronan, a Virginia transplant who recently settled in Hyde Park, pointed to her compelling personal story of growing up in Boston and overcoming hardships like the early loss of her parents and the loss of her twin brother Andre.

“You can tell that she’s not from the political class. She’s out here to do the right work and do the right thing even if it’s not always the best thing for her politically,” he said. “I think with any issue she has to tackle, she’ll do it through the right lens of people,” he said.

The popular view is that Campbell rose through the ranks of political life in spite of her hardships. Those who know her well, however, say there is nothing "unlikely" about her rise.

“Andrea is incredibly intelligent and has a lot to offer and you could see that she was going to have a great career in front of her,” said Joyce Linehan, former chief of policy and planning for mayor Marty Walsh.

“I think that she’s worked really, really, hard for this. She’s connected with a lot of voters over the course of the time that she’s been involved in politics and I think she deserves this win.”