New Hope has long been known as one of the most gay-friendly towns in the region, a place where rainbow flags flutter in front of boutique shops and the borough council began passing gay-rights resolutions about a decade ago, well before the recent surge nationwide.

So it might not be surprising that a variety of local residents have expressed outrage and disappointment in recent days, after Mayor Larry Keller, citing his duty as an elected official to uphold the law, declined to officiate a same-sex wedding for a couple who had obtained a marriage license in Montgomery County, where such licenses have been issued in defiance of state law since earlier this month.

In a letter to council members last week, Keller said that he did not want to "put New Hope Borough, and myself, at legal risk for breach of my official duties as Mayor" by overseeing the wedding. State law defines marriage as being between one man and one woman.

In an interview Tuesday, Keller, a Republican who said he supports same-sex marriage, added that "it was a freaking heart-wrenching decision for me," but that "I've sworn an oath as I became mayor that I would uphold the laws of the Commonwealth of Pennsylvania."

The decision didn't sit well with some area residents.

"It's disappointing that our mayor did not use this as an opportunity to lead and continue the New Hope community tradition of acceptance and equality for all," council member Geri Delevich said.

Louis Licitra, a gay-rights activist who lives in neighboring Solebury Township, said that while he understands Keller's predicament, the mayor should "make the statement that although he can't do it, he disagrees with the state's discriminatory laws."

And Marcus Saitschenko, 52, the Philadelphia resident who asked Keller to officiate at his marriage specifically because of New Hope's gay-friendly reputation, put the situation in more personal terms: Keller's denial "felt like a stab in the back."

Keller's decision comes amid a flurry of activity involving the state's same-sex marriage laws.

Last month, the American Civil Liberties Union filed a suit challenging the state's ban on same-sex marriage, and Attorney General Kathleen Kane said she would not defend the ban in court. The Corbett administration is defending it instead.

Suits have also been filed by both supporters and opponents of Montgomery County's Register of Wills office, which has been defying state law and issuing same-sex marriage licenses since early August at the direction of Register of Wills D. Bruce Hanes.

Contact Chris Palmer at 609-217-8305, cpalmer@phillynews.com, or follow on Twitter @cs_palmer.