Mitt Romneys foreign policy spokesman, a gay man whose support for same-sex marriage infuriated social conservatives, has quit less than two weeks after he was hired, saying the intense focus on his sexuality was making it impossible for him to do his job.

Richard A. Grenell, who served as the spokesman for the American mission to the United Nations under President George W. Bush, announced his decision in a statement, which was first reported by the Washington Post.

While I welcomed the challenge to confront President Obamas foreign policy failures and weak leadership on the world stage, my ability to speak clearly and forcefully on the issues has been greatly diminished by the hyper-partisan discussion of personal issues that sometimes comes from a presidential campaign, said in the statement. I want to thank Governor Romney for his belief in me and my abilities and his clear message to me that being openly gay was a non-issue for him and his team.

Romneys campaign manager, Matt Rhoades, said the former Massachusetts governor accepted Grenells decision.

We are disappointed that Ric decided to resign from the campaign for his own personal reasons, Rhoades said in a statement. We wanted him to stay because he had superior qualifications for the position he was hired to fill.

Grenells hiring by the Romney campaign had caused a firestorm from critics on the right who expressed outrage that Romney would hire a gay man and a supporter of same-sex marriage.

Thats like throwing salt into a wound, and thats the absolute wrong decision if he wants to reach out to the conservative base and unite them, Mathew D. Staver, founder and chairman of Liberty Counsel, a conservative legal group, told the Globe in a story published today.

But R. Clarke Cooper, executive director of the Log Cabin Republicans, a group that advocates for gay Republicans, did not fault conservatives for forcing Grenell out of his job. He pointed out that liberal activists had also criticized Grenell for working for Romney, even though Romney opposes same-sex marriage.

Essentially, he was hounded by the far right and the left, said Cooper, who served with Grenell in the Bush administration.

Its unfortunate and its disappointing, Cooper added. The Romney campaign has lost a very well-respected advocate in the conservative community and a very talented spokesman. This guy is immensely qualified.

The Obama campaign pounced on Grenells decision, accusing the Romney campaign of caving to extremists in the Republican Party.

Today we learned that in the year 2012, a Republican nominee for president cant have a gay person as spokesman, Teddy Goff, the Obama campaigns digital director, wrote in a tweet.

Michael Levenson can be reached at mlevenson@globe.com.

© Copyright 2012 Globe Newspaper Company.