The Provincetown Select Board has chosen Holyoke Mayor Alex Morse to be their next town manager. Morse lost a bitter congressional primary fight last year against Rep. Richard Neal during which Democratic officials supported a smear campaign suggesting Morse had made inappropriate overtures to young men.

The 31-year-old Morse was among three finalists for the Provincetown position. He had previously announced he was not seeking re-election after serving as Holyoke's mayor for 10 years; the Provincetown Select Board voted 5-0 in favor of hiring him Thursday night.

“I’m thrilled and excited and honored by their vote and am looking forward to serving Provincetown,” Morse told reporters.

Morse, who was elected as mayor of Holyoke in 2011 when he was 22, became the city’s first openly gay mayor. He said he has visited Provincetown — a popular gay resort — many times. During his hour-long interview with the Select Board Morse said, “For many folks like me and in our community, Provincetown has been a refuge and a special place in our lives and in our community’s history.”

He admitted the move across state was “bittersweet” and said Holyoke would always be his hometown.

Morse currently earns $85,000 as mayor of Holyoke. In his new job he will earn between $180,000 and $200,000 including a housing allowance, due to Provincetown's high housing costs, but the exact salary and starting date have not yet been agreed upon.

Morse said Holyoke City Council President Todd McGee has agreed to become acting mayor until the November election.

During last year's primary race against Neal, Morse at first apologized when the UMass College Democrats group barred him from events, alleging that his communications with members over dating apps made some of them uncomfortable. But the Massachusetts Democratic Party later acknowledged that leaders worked with the College Democrats to amplify the allegations in an attempt help Neal's campaign.