President Barack Obama isn't one to shy away from the truth. But a remark from the commander in chief where he called Kamala Harris “the best looking attorney general” has sparked controversy and raised questions about sexism in public office.

During a fundraiser in Atherton, Calif., on Thursday, Obama’s kind words about Harris raised a few eyebrows when a warm introduction turned into comments about her looks.

"You have to be careful to, first of all, say she is brilliant and she is dedicated and she is tough, and she is exactly what you'd want in anybody who is administering the law, and making sure that everybody is getting a fair shake,” Obama said.

Then, the commentary took a turn.

“She also happens to be by far the best-looking attorney general in the country -- Kamala Harris is here." As the crowd laughed, Obama reaffirmed his comments."It's true! C'mon!"

The comments about Harris, who has served as California’s attorney general since 2011, have drawn mixed reactions from pundits, some of whom believe Obama was out of line while others applauded the president’s honesty.

New York Magazine’s Jonathan Chait called the comments “disgraceful.”

“Women have a hard time being judged purely on their merits,” he wrote. “Discussing their appearance in the context of evaluating their job performance makes it worse.”

In a Washington Post blog opinion writer Jonathan Capehart countered Obama “spoke the God’s honest truth.”

“Judging by some of the comments I’ve seen on Twitter you’d swear the president was guilty of luridly cat-calling a woman he doesn’t know. If I thought for one moment that’s what was going on, you better believe I’d hammer him for it. But that’s not the case here. Far from it. So lighten up, people.”

Obama was in California for a political fundraiser held at the home of Levi Strauss-heir John Goldman.

Harris and Obama are said to be longtime friends. Last summer, she spoke at the Democratic National Convention and has been considered a potentially strong candidate to become governor of the state or a Supreme Court justice.

She was born in Oakland to an Indian mother and a Jamaican-American father. She attended Howard University in Washington and received her juris doctor from the University of California, Hastings College of Law in 1989. She worked as the district attorney of San Francisco from 2004 to 2011.

Harris has been referred to as the “female Barack Obama,” according to the Root, which is published by a division of the Washington Post Co.

“I'm humbled that anyone would make the comparison between me and the president,” she said. “I think he's an extraordinary leader. Certainly, he and I have been supporting each other for a long period of time because of our shared values and commitment to public service."