Image caption President Obama said Kamala Harris was "the best-looking attorney general in the country"

US President Barack Obama has issued an apology after he was widely criticised for referring to the attorney general of California, Kamala Harris, as "the best-looking attorney general in the country".

The White House said he had apologised to Ms Harris, a long-time friend, for the "distraction" created by his comments and that he fully recognised that women should not be judged on appearance. Commentators in the US have been giving their reaction to the apology, and whether Mr Obama was right to say sorry.

Eric Golub writes in the Washington Times: "Conservatives like myself were forced into the uncomfortable position of defending President Obama. Restoring a modicum of integrity and sanity to this world requires it. In fact, Obama's "ogling" actually goes a tiny way toward rebutting a major criticism of him. Android computers lacking human emotion are incapable of lust, so Obama may be human."

Jennifer Rubin in the Washington Post wonders whether everyone has "gone stark raving mad", saying the president was "bludgeoned" into apologising. "Conservatives should figure out there is a bunch of real stuff to be complaining about, and much of this nonsense simply makes them look like they are back in junior high. And the tut-tutters on the left? Well, they shouldn't be surprised that young women don't want to be called 'feminists'. If the compliment police are going to descend every time a pleasantry is offered, well then the heck with 'feminism'."

But Amanda Marcotte says the anger sparked by Mr Obama's comment is justified. She cites research which argues that even "benevolent" compliments reinforce the idea that women have secondary status in society. "As a tool to keep women playing along with male dominance, benevolent sexism works far better than hostile sexism; no wonder we're seeing it so fiercely defended," she writes in Slate.

On feminist blog Jezebel, Katie JM Baker says it was right of the president to apologise. "Women put up with enough unsolicited attention as it is; the president of our country doesn't need to legitimize the practice by piling on."

Robin Abcarian of the Los Angeles Times asks: "Does merely stating the obvious make the president sexist? More wolfish than sexist, I'd say." He adds: "But still. Let's not pretend that physical beauty is not a bonus in politics, particularly for women, who then walk a fine line between wanting to be found attractive and not wanting to be judged on looks."

But his colleague at the LA Times, Patt Morrison responds by asking: "How many times have women squirmed as they've had to listen to men make remarks like this, clumsy efforts at a compliment that wind up sounding embarrassing and even demeaning?" Insults can be easily challenged, she writes. "But a woman who tries to fend off an inapt compliment ... risks being critiqued as humorless, and more graceless than the man who made the remark."

In New York Magazine, Dan Amira responds to accusations of sexism being levelled against Mr Obama by pointing out that he has referred to many officials as being good-looking in the past, usually men. "In short, Obama is an equal-opportunity flatterer, not a shallow, sexist pig. Calling people "good-looking" — men, women, Penguins — is just something he does. It's almost a tic at this point. He doesn't mean anything by it. "

Finally, CNN contributor Ruben Navarrette Jr says the greatest controversy is not what the president said, but the extent of media coverage it has generated.

"There is only one reason the president is skating on these remarks. It's because the people who normally complain about this stuff - the folks who make up the grievance lobby - are among his strongest supporters.

"This is an example of selective outrage and double standards. That part of the story isn't pretty."