Democrat Colleen M. Lachowicz beat Republican incumbent Thomas H. Martin Jr. by 913 votes Tuesday in the race for Senate District 25.

Lachowicz defeated Martin 8,666 to 7,753.

She won only one community in the district, Waterville, but by a commanding 4,224 to 2,318 vote. Martin took all the others.

He won in Winslow 2,007 to 1,921; in Pittsfield 990-702; in Detroit 179-163; in Clinton 837-705; in Benton 824-579; and in Albion 598-372.

Lachowicz, 48, a social worker and clinical supervisor for Kennebec Behavioral Health, was celebrating late Tuesday with friends, family members, supporters and volunteers at Post Office Square in downtown Waterville.

“This started a long time ago because I realized there were things that needed to be fixed,” Lachowicz said. “I thank every voter and all the volunteers. I’m just so grateful. And all the people around the world — thank you.”

Martin, 47, who held the senate seat two years, is co-owner of Nitram Excavation & General Contractors Inc., of Benton.

The race drew international attention twice in a week earlier this fall when the state Republican Party created a website and mailed out flyers criticizing Lachowicz for engaging in a fantasy online game and making “crude, vicious and violent online comments”; as well as and when the Democratic Legislative Campaign Committee called the race one of the key battlegrounds in legislative races across the country.

Lachowicz said after the Republican attacks that she thought Mainers saw the “political stunt” as bullying and that is why she received an outpouring of support for her campaign following the controversy. She said it provided additional motivation for her and her supporters to keep talking with voters.

Martin said he had nothing to do with the flyers and did not learn until after the fact that they were being distributed. He said he emailed Lachowicz after the attacks and assured her they did not come from him.

But both Martin and David Sorensen, spokesman for the Maine Republican Party, said they believed the attack on Lachowicz was not simply about her gaming, but also about comments she made online about how she was losing productivity and being lazy at her job, which is partially funded by taxes, because she was engaging in gaming.

Last week, after a complaint was filed by the Maine Republican Party, the state Ethics Commission ruled that Lachowicz would not face an investigation into her fundraising activities.

Lachowicz ran her campaign on the promise that she would help create jobs and improve the economy — which she cited as two of the most important issues facing the state.

The former chairman of the Waterville City Democratic Committee and former vice chairman of the Kennebec County Democratic Committee said the people of Maine are underemployed and have not been able to find jobs, and families are suffering. She also said she is a big supporter of education that will help prepare people for jobs and she supports investing in efforts that will bring jobs to Maine.