An African-American Boston city councilwoman ousted a 10-term congressman on Tuesday in a historic upset in the Democratic primary for a Massachusetts congressional seat.

Ayanna Pressley, 44, beat veteran politician Mike Capuano, 66, after mounting an insurgent campaign in Massachusetts 7th Congressional District.

Pressley was endorsed by fellow congressional upstart Alexandria Ocasio-Cortez.

There is no Republican challenger in the November general election.

“It seems like change is on the way,” Pressley told her supporters to rousing applause Tuesday night.

“These times demanded more from our leaders and from our party. These times demanded an approach to governing that was bold uncompromising and unafraid.

“That with our lives under assault with our freedoms under siege that it’s not just good enough to see the Democrats back in power, but it matters who those Democrats are.”

Capuano conceded the race at around 9 p.m.

“I’m sorry it didn’t work out, but this is life,” Capuano told supporters.

“This is OK. America is going to be OK. Ayanna Pressley is going to be a good congresswoman, and Massachusetts will be well served.”