FITCHBURG – Fitchburg Republican Dean A. Tran, elected Tuesday to represent the Worcester and Middlesex District in the state Senate, is no stranger to struggles, having immigrated to Massachusetts from Vietnam as a child with others known as “boat people.”

Mr. Tran, 42, won Tuesday’s special election for the open state Senate seat in the Worcester and Middlesex District, defeating Democrat Susan A. Chalifoux Zephir of Leominster by 675 votes. Also in the running were Leominster City Councilor Claire M. Freda, who is not enrolled in a political party,  and Charlene DiCalogero of Berlin, a Green-Rainbow Party candidate.

The Senate district consists of Fitchburg, Gardner, Leominster, Berlin, Bolton, Lancaster, Lunenburg, Sterling, Westminster, Townsend and Precincts 1 and 2 in Clinton.

The unofficial results from Tuesday: Mr. Tran, 7,289 votes; Ms. Chalifoux Zephir, 6,614; Ms. Freda, 1,552; and Ms. DiCalogero, 201.

Mr. Tran says he plans to resign his seat on the city council at the end of the month and also leave his job as a senior manager at a software development company. He said he will open four district offices, in Gardner, on the Bolton-Berlin line, in Sterling, and a main office in Leominster that would also cover Fitchburg and surrounding communities. Mr. Tran has served on the city council, his first elected position, since 2006.

“I think it will be a little sad to leave the City Council,” he said Wednesday. “I have enjoyed working with department heads and my colleagues on the council, but at the same time I’m ecstatic that my constituency has grown and I can provide services to not just the people in Fitchburg, but now to 10 other communities.”

Mr. Tran said he plans to push a review of the state-funding formula for public schools to ensure less-wealthy communities in the district are receiving their fair share; advocate for improvements to infrastructure in communities “west of Route 495,” and work to attract businesses to the area, and help expand existing businesses, to spur economic development. He said he would also continue working on mental health and substance abuse issues, as did Democrat Jennifer L. Flanagan of Leominster, who held the Senate seat until earlier this year, when Gov. Charles D. Baker Jr. appointed her to the Cannabis Control Commission.

Mr. Tran said he will also focus on prevention in the opioid crisis, including making the state border more secure and targeting drug traffickers and those who overprescribe opioids.

Mr. Tran said he plans to remain in Fitchburg, where he moved in 1986 from Clinton – the community he and his family first moved to when they arrived in the U.S. in 1980 from Vietnam.

“We left Vietnam on a boat when I was 2 and drifted to Thailand and stayed in a refugee camp for another two years,” Mr. Tran said. “We got green cards sponsored by a Catholic priest in 1980.”

He is the second youngest of five children who came to the U.S. with their parents. They left Vietnam in 1977 at the end of the war. His father had served in the Army for 25 years and the family saved all their money to leave, he said.

“My father saved every single penny and put the family on a wooden boat,” he said. “I watched a documentary. We were called ‘boat people’ and drifted on the ocean for 12 days. I still remember the smell – a mixture of salt water and fuel from the old engine on the wooden boat. I can still smell that. We were very lucky. A lot of people died from dehydration drinking salt water.”

He said believes immigration policies established by the Trump-Pence administration are a “little harsh” and believes the federal government should provide a path to citizenship for undocumented immigrants.

“In certain circumstances, good people who contribute to society, there should always be a way for them to become citizens,” he said. “There needs to be a path for these people like there was a path for us. We received green cards and took a naturalization class. There should be a path whether they are undocumented or not.”

He said he is strongly opposed to tying the hands of law enforcement officials and withholding funding to communities that limit their cooperation with federal immigration enforcement.

“I’m not aware of any police department in the state arresting people and handing them over to ICE (U.S. Immigration and Customs Enforcement). That’s a good thing,” Mr. Tran said. “Second, withholding funds to cities and towns that don’t abide to federal regulations – I fully disagree. I have experience on the local level and know that every penny that goes to towns and cities is needed to provide necessary services. You can’t punish towns or cities for decisions made by some idiotic elected officials.”

Mr. Tran and his wife, Kerry, have four children, three in the Fitchburg public school system: Isabelle, 19, Olivia, 14, Madilyn, 8, and Dean Jr., 5.