Israeli Prime Minister Benjamin Netanyahu's new spokesman has apologized for past comments in which he called President Barack Obama anti-Semitic and Secretary of State John Kerry childish.

Ran Baratz's apology came just days before Netanyahu and Obama meet at the White House.

Baratz says his comments posted on Facebook were "written without thinking and sometimes as jokes in language which is appropriate for social networks and for a private person."

Netanyahu wrote on Twitter that Baratz's posts "are totally unacceptable and in no way reflect my positions or the policies of Israel."

White House spokesman John Earnest said Baratz's apology was "warranted," but would not say if the White House believes Netanyahu should replace him.

"I would not anticipate that this person's appearance in the international spotlight here is going to have much of an impact on the ability of Prime Minister Netanyahu and President Obama to work effectively to advance the interests of our two countries."

Just a few hours after Netanyahu appointed Baratz as his spokesman Wednesday, old Facebook posts emerged in which Baratz called Obama's opposition to Netanyahu's speech to the U.S. Congress in March an example of "modern anti-Semitism in liberal Western states."

Baratz also derided Secretary of State John Kerry for having the "mental age" of a 12-year-old child.

Baratz's comments were not limited to U.S. leaders. He called Israeli President Reuven Rivlin so marginal, that if he were sent into the Syrian portion of Golan, Islamic State would send him back.

Baratz is a conservative who lives in a Jewish settlement on the West Bank. The Israeli Cabinet still has to approve his appointment. He is not accompanying Netanyahu to Washington.