The race to fill the vacant Plymouth and Barnstable state Senate seat will pit two candidates from Cape Cod.

PLYMOUTH –The race to fill the vacant Plymouth and Barnstable State Senate seat will pit two candidates from Cape Cod.

Democrat Susan Moran of Falmouth and Republican James “Jay” McMahon III will face off later this month in a special election for the seat.

Moran, a Falmouth selectman, won a five-way primary race to represent Democrats in the special election on March 31. Moran narrowly defeated Plymouth Selectman John Mahoney by 8,871 to 8,606, 27 percent to 26.2. The 265-vote margin of victory was less than 1 percent of the overall votes cast by Democrats.

Thomas Moakley of Falmouth finished third in the Democratic primary with 6,767 votes. Becky Coletta of Pembroke had 6,683 votes. Stephen Michael Palmer of Plymouth received 1,931 votes.

In the Republican primary, McMahon defeated Jesse Brown of Plymouth with 8,281 votes to 6,474, or 56.1 percent to 43.9.

The district includes the towns of Pembroke, Kingston, Plymouth, Bourne, Sandwich and Falmouth. The state senator for the district had hailed from Plymouth for 27 years, since former Senate President Therese Murray was first elected to the post in 1993.

Plymouthean Vinny deMacedo succeeded Murray in 2015. He resigned last fall to take a job at Bridgewater State University, prompting the March 31 special election.

Moran, who billed herself as a Terry Murray Democrat, won handily in the three Cape Cod towns of Falmouth, Bourne and Sandwich. Coletta, an attorney and real estate broker in Pembroke, was top vote-getter among Democrats in her hometown and in Kingston.

Mahoney, a member of the Plymouth Select Board, overwhelmingly captured his hometown of Plymouth with 5,901 votes. Moran was the lowest vote-getter in Plymouth, with 1,048. Coletta, Moakley and Palmer each received more than 1,000 votes in Plymouth.

Mahoney said he felt fortunate to be in a field with four very talented candidates and was proud to have run a clean, issues-based race.

“This race gave me an opportunity to get re-acquainted with old friends in a couple of other communities, and that was a blessing. And I think my supporters understand that I bring a certain level of passion to elected office and I can’t thank them enough for the amount of support they’ve given me over the years,” Mahoney said. “The level of support in the town of Plymouth was off the charts.”

Mahoney said Moran is a very talented person and has his 100-percent support.

“I’m looking forward to supporting her candidacy and speaking at a unity event with all the individuals who competed in this recent primary,” he said.

Coletta conceded the race before all of the votes were tallied, calling the campaign one of the most rewarding experiences of her life.

“Over the last five months, I have met so many wonderful people from Pembroke to Falmouth. I have learned more about the issues facing our region than I ever could have imagined. Unfortunately, even though we put together a robust effort, tonight our campaign fell short of the goal,” she said in a statement.

Coletta thanked all who voted for her and contributed to the campaign. “Tonight might be the end of my campaign in this race, but we need to make sure we keep fighting to turn the Plymouth and Barnstable District blue on March 31st,” she said.

In the Republican primary, Brown won his hometown of Plymouth with 2,988 votes to 2,084.

But McMahon earned modest wins in Kingston and Pembroke and won convincingly on the Cape. McMahon beat Brown by more than 1,100 votes in his hometown of Bourne. He took Sandwich by a 2 to1 margin.

In a phone interview, Brown was disappointed but upbeat about the end of his primary run.

“I’m very proud of our campaign,” he said. “We did a lot of hard work and we had a lot of good people supporting us. We just didn’t get the results we were hoping for. I’m proud of the way we ran the campaign with a lot of positive messaging. I’m thankful to everyone who helped us or voted for me.”

As to his future plans, Brown said it was too early to say. The term for the state Senate seat expires on Jan. 2, 2021, which means a primary and election will be held again this fall.

“It’s less than 24 hours after this primary,” he said. “It’s very early. I’m not ready to make a decision.”

McMahon said he believe three issues – no more tax increases, reform of opioid addiction treatment and no more government spending on illegal immigrants and sanctuary cities – drove voters to the polls in his favor.

McMahon believes the Republican Party will unite behind him for the special election March 31.

Moran and her supporters left their gathering at Liam Maguire's Irish Pub in Falmouth at around 11:30 p.m. Tuesday. They were still waiting to hear from key Plymouth precincts. She did not expect to receive final results until Wednesday morning. Still, she remained hopeful, she said.

"I remain optimistic and will wait for the numbers in the morning," Moran said.

And the numbers were just what she wanted to hear.

Wicked Local and Cape Cod Times staff contributed to this report.