One of the most telling returns out of this week’s primary battle between Boston City Councilor Ayanna Pressley and Representative Michael E. Capuano was in Somerville.
Before Election Day, conventional wisdom held that if Capuano won the Democratic primary — as many expected him to — it would be due to his strength in Somerville and other areas outside Boston. Pressley, meanwhile, would dominate in the Hub.
Except Somerville, where Capuano served as mayor in the 1990s, didn’t provide him with a crushing win. He won it by 122 votes, or with just over 50 percent, according to the unofficial Associated Press tally. And in Boston, which made up the majority of the district’s votes on Tuesday, Capuano was crushed, losing to Pressley 64 percent to 36 percent.
Overall, Capuano lost the primary to Pressley by 17 points.
But Somerville’s 50-50 result is especially dramatic given Capuano’s history with the area. He served as mayor and alderman before being elected to Congress in 1998. He still lives on Central Street.
“Somerville of old is not at all the Somerville of today,” said Somerville Board of Alderman President Katjana Ballantyne, who supported Pressley.
She speaks from experience: Five years ago she ran against the congressman’s son, Joe Capuano. “Everyone thought, including Joe, that the Capuano name was this huge asset, but for many new residents they had no idea who their congressman was, so it turned out to be a nonfactor,” Ballantyne said.
Somerville Mayor Joe Curtatone, who backed Capuano, said he was “surprised, but not shocked” that Pressley did so well in his city.
“Because of President Trump, voters are fired up and turning out, something we saw even in city elections last year,” Curtatone said. “The city is becoming younger and more diverse and they are asking more of their leaders.”
And while there hasn’t been a competitive Democratic primary in the area for comparison, local leaders — and both campaigns themselves — said they were surprised by the turnout, especially in wards full of newly transplanted millennial residents.
Capuano won five of the city’s seven wards, stretching from East Somerville through West Somerville. But Pressley won by huge margins in millennial-rich pockets like Davis Square and Union Square, where Pressley received 59 percent of the vote.
Somerville School Board member Andre Green represents Ward Four — Winter Hill, Ten Hills, and Mystic View neighborhoods — parts of “Old Somerville,” as he called it. He said he was watching for a particular number in Somerville overall on Election Day.
“I thought if she could get 40 percent here then it wouldn’t be enough of a firewall for him to overcome her Boston lead,” said Green.
Pressley had just under 50 percent in Somerville. But it was her massive lead in Boston — about 17,500 votes — that made her advantage insurmountable. Indeed, two out of three votes Pressley got in the entire district came from Boston voters.
Capuano did best in Everett, where he won by about 1,300 votes, or 65 percent to 35 percent. He also won the parts of the district in Chelsea, 54 percent to 45 percent, although only 2,000 votes were cast there.
Steve Koczela, president of The MassINC Polling Group, said his polling showed that, provided Pressley did well in Boston, the race would be won or lost in places like Somerville.
James Pindell can be reached at firstname.lastname@example.org. Follow him on Twitter @jamespindell or subscribe to his Ground Game newsletter on politics:http://pages.email.bostonglobe.com/GroundGameSignUp