"There was an awful lot against us," said Speliotis, thanking his "entire extended family in this room."
Speliotis said he survived a wave of sentiment for Republicans, with unsuccessful gubernatorial challenger Charlie Baker, a Swampscott businessman, beating Gov. Deval Patrick in Danvers, 5,595 to 4,021.
"We bucked the tide," Speliotis said in an interview.
Speliotis also survived because of his margin of victory in Danvers and West Peabody.
Bennett, meanwhile, bested Speliotis in Topsfield by 255 votes: 1,676 to 1,421.
The key to the race, Bennett said, was "not doing better in Topsfield. It didn't offset Peabody."
Speliotis beat Bennett, 61, in Danvers 5,400 to 5,004, a difference of just 396 votes, and a margin of victory of less than 4 percent, not including write-ins and blanks.
Turnout in Danvers stood at 59.5 percent.
In Ward 6 in Peabody, Speliotis won with 1,919 votes to Bennett's 1,566, a difference of 353 votes. About 64 percent of voters turned out in Ward 6.
"You are a magician," Kosma Evangelidis of Peabody told Speliotis at the Polish Club. The Peabody man and fellow trustee at Essex Agricultural and Technical High School with Bennett ran Bennett's campaign.
Speliotis, meanwhile, has two daughters, Pia, 29, and Ashley, 27, and they both worked hard on their father's campaign, Speliotis said in a prior interview.
Speliotis is one of the most senior members of the state legislature. He served as a state representative from 1979 to 1986 in a district that once covered three precincts in Danvers and most of Peabody, before losing in his bid for re-election by 72 votes to Tom Walsh, a former city councilor in Peabody.
Both Bennett and Speliotis, the chairman of the Joint Committee on Consumer Protection and Professional Licensure, ran grass-roots campaigns that featured both candidates walking neighborhoods to spread their message.
"How many doors did you knock on?" asked former Danvers Selectman Bill Nicholson during Speliotis' victory speech.
"A lot," Speliotis said.
"I heard it was 12,000," Nicholson said.
Staff writer Ethan Forman can be reached at 978-338-2673 or by e-mail at firstname.lastname@example.org.