A town police commissioner has resigned after he admitted using a racial slur to describe President Barack Obama, an official said Monday.

Robert Copeland, 82, resigned Sunday night from the post to which he was re-elected in March, Board of Selectmen Chair Linda Murray said, putting to rest a controversy that drew national attention and sparked impassioned debate in this resort town of 6,300 on the shore of Lake Winnipesaukee.

“The town is pleased,” Murray said Monday. “This gives us the opportunity to move on. We are a very accepting community that really takes care of each other.”

At a meeting last week, Copeland defiantly sat with his arms folded as more than 100 residents pushed for his ouster and tore into his comments, saying he didn’t speak the town or its people.

Copeland admitted using the slur, preceded by an obscenity, while he was at a restaurant in March. A resident, Jane O’Toole, overheard him and complained to town officials when she learned that Copeland was a police commissioner.

“I believe I did use the ‘N’ word in reference to the current occupant of the Whitehouse,” Copeland wrote in the April email sent to the two other commissioners and forwarded to O’Toole. “For this, I do not apologize — he meets and exceeds my criteria for such.”

That defiance did not sit well with many in the town.

“I thought it was disgusting, and the way he justified it, it was even more disgusting,” said Ernie Bauer, a 64-year-old carpenter. “It was disgusting 50 years ago.”

A handful of people at the meeting spoke on behalf of Copeland, saying he had a right to free speech. But the louder message came from those who wanted him out.

O’Toole said Monday that she was pleased he stepped down.

“I feel it was the right thing for him to do to stop this incredible train that had been blowing through our town,” she said. “I’m thrilled. The people of Wolfeboro have stood up and said that this is not acceptable.”

Mitt Romney, the former GOP presidential nominee and a former Massachusetts governor, owns a home in Wolfeboro and had called for Copeland’s resignation, saying “the vile epithet used and confirmed by the commissioner has no place in our community.”

About 20 black people live year-round in Wolfeboro, in the scenic Lakes Region of New Hampshire, a state that’s 94 percent white and 1 percent black. None of the town police department’s 12 full-time officers is black or a member of another minority.

Police Chief Stuart Chase said Copeland’s slur was “not indicative of the posture of this department. We treat everyone with dignity and respect.”

Town officials also said they were appalled by Copeland’s comments but said they were powerless to remove an elected official.

Jamie Murray said she wasn’t surprised to hear racist comments since her biracial son has also faced taunts.

“It also gave me an understanding as to why the children think it’s OK,” she said Monday. “When you’re held in office, and you decide to become an elected official, you represent something higher than your own standards and your own things, and you need to stand up for the community in which you serve.”