President Obama called California’s attorney general to apologize for singling her out for her looks, the White House said on Friday.

The president “did not want in any way to diminish the attorney general’s professional accomplishments and her capabilities,”  White House Press Secretary Jay Carney said of Obama’s claim at a California fundraiser Thursday that Kamala Harris was “by far the best-looking attorney general in the country.”

Critics accused the president of sexism, saying he diminished Harris’ accomplishments by bringing up her looks. Others said that Obama was merely complementing his long-time friend.

Regardless, the remarks became an immediate distraction for the White House. The gaffe picked up traction at a time the administration would prefer to focus on the release of the president’s budget.