Ayanna Pressley
Democratic candidate for U.S. House of Representatives Ayanna Pressley speaks after winning the primary in Boston, Massachusetts, Sept. 4, 2018. REUTERS/Brian Snyder

Boston City Council member Ayanna Pressley won the Democratic nomination in Massachusetts’ Seventh Congressional District on Tuesday.

Pressley defeated 10-term U.S. Rep. Michael Capuano by 16,818 votes in the Massachusetts House race. Pressley is a member of the Justice Democrats, a political organization established post President Donald Trump's victory in 2016 elections, in order to reform the Democratic Party.

"I will tell you, I'm sorry it didn't work out but this is life and this is OK. America is going to be OK. Ayanna Pressley is going to be a good congresswoman and Massachusetts will be well served,” Capuano said in his concession speech, CNN reported.

Her win comes less than three months after Alexandria Ocasio-Cortez ousted Rep. Joe Crowley of New York, in a primary. However, unlike Crowley, Capuano had fiercely contested the race by obtaining endorsements and participating in debates.

"Congratulations to my sister in service, Ayanna Pressley, on continuing her historic path into Congress tonight,” Ocasio-Cortez tweeted Tuesday night.

Pressley was elected to the Boston City Council in 2009, thus becoming the first woman of color to be elected to the Council in its 100-year history.

According to Pressley's website, she was raised in Chicago. She said her activist mother instilled in her the value of civic participation. Post her election to the council, Pressley worked toward establishing the Committee on Healthy Women, Families, and Communities.

“The Committee addresses causes that Ayanna has always been most devoted to: stabilizing families and communities, reducing and preventing violence and trauma, combating poverty, and addressing issues that disproportionately impact women and girls,” her website added.

In her nine-year tenure on the Council, she mandated enforcement of a pregnant and parenting teen policy for Boston public schools, developed a comprehensive sexual education and health curriculum and convened the first listening-only hearing in the Boston City Council’s history.

She also worked as a senior aide for Congressman Joseph P. Kennedy II and later for Sen. John Kerry before being elected to the council.

During her campaign, she spoke about having a more assertive style of leadership. "This is a fight for the soul of our party. This is a fight for the future of our democracy. We might vote the same way, but we will lead differently. These times require and this district deserves bold, activist leadership," she said.

She also said systemic inequalities have worsened in the district once represented by John F. Kennedy.

"It's about who I listen to and it's about who I govern with. And there are a lot of people in this district who feel left out and left behind and ignored -- and it's not just women, it's not just people of color. It runs the gamut. And I think after a generation, the district deserves a choice,” Pressley told CNN on Sept. 1.

She also managed to draw support from Massachusetts' popular attorney general Maura Healey by calling for defunding the federal Immigration and Customs Enforcement agency.

With no Republican challenging her in November, she is all set to become the first African-American woman elected to Congress from the Commonwealth.