BOSTON — With a terse letter of resignation, a police commissioner in Wolfeboro, N.H., has stepped down after a cascade of complaints objecting to his use of a racial slur to describe President Obama. The commissioner, Robert Copeland, 82, who is also a lawyer, confirmed that he had made the statement. He had said he was exercising his First Amendment right of free speech.

But reports of the slur, which was overheard by another diner at a restaurant in March, shone a harsh light on this small resort town of 6,000 on the eastern shore of Lake Winnipesaukee, just as the promise of summer was bringing it back to life.

Public officials and people from around the country began inundating the town’s police department with calls for Mr. Copeland’s resignation. Mitt Romney, the 2012 Republican presidential nominee and Wolfeboro’s most prominent summer resident, added his criticism. “The vile epithet used and confirmed by the commissioner has no place in our community,” Mr. Romney said in a statement last week. “He should apologize and resign.”

Gov. Maggie Hassan, a Democrat, also called for Mr. Copeland’s resignation, with her spokesman saying she believed that Mr. Copeland “should listen to the people of Wolfeboro and New Hampshire and apologize and step down in order to restore confidence in the commission.”