The man Israeli Prime Minister Benjamin Netanyahu picked as his new chief of public diplomacy apologized on Thursday for comparing Secretary of State John Kerry’s “mental age” to that of a 12-year-old and suggesting that President Barack Obama is anti-Semitic. Netanyahu also distanced himself from Ran Baratz’s remarks, which were posted on his Facebook page, saying he hadn’t been aware of them before the nomination.

JERUSALEM, ISRAEL - MARCH 22: (ISRAEL OUT) U.S. President Barack Obama speaks with Israeli Prime Minister Benjamin Netanyahu during his visit to the Yad Vashem Holocaust Memorial museum on March 22, 2013 in Jerusalem, Israel. This is Obama's first visit as president to the region and his itinerary includes meetings with the Palestinian and Israeli leaders as well as a visit to the Church of the Nativity in Bethlehem. (Photo by Uriel Sinai/Getty Images)

The man Israeli Prime Minister Benjamin Netanyahu picked as his new chief of public diplomacy apologized on Thursday for comparing Secretary of State John Kerry’s “mental age” to that of a 12-year-old and suggesting that President Barack Obama is anti-Semitic. Netanyahu also distanced himself from Ran Baratz’s remarks, some of them posted on his Facebook page, saying he hadn’t been aware of them before the nomination.

“Those posts are totally unacceptable and in no way reflect my positions or the policies of the Government of Israel,” the prime minister said on Thursday.

The flap over the nomination of Baratz, a conservative Israeli academic, comes days ahead of Netanyahu’s visit to Washington next week, a trip aimed at strengthening Israel’s ties with Washington following the bruising battle over the Obama administration’s nuclear deal with Iran.

On Thursday, White House Press Secretary Josh Earnest said “it’s readily apparent that that apology was warranted,” but the decision whether or not to withdraw Baratz’s nomination is Netanyahu’s to make.

Last year, Baratz, who has a Ph.D. in philosophy, reacted to Kerry’s remarks in favor of a peace deal between Israelis and Palestinians by writing, “This is the time to wish the secretary of state good luck, and to count down the days with the hope that someone over there at the State Department will wake up and begin to see the world through the eyes of a person whose mental age exceeds 12.”

In March, Baratz took to Facebook to criticize Obama’s response to a speech Netanyahu made in Congress opposing the emerging Iran nuclear deal. “This is how modern anti-Semitism looks like in the modern Western world,” he wrote.

In his apology on Thursday, Baratz said the things he wrote were in “jest.”

“I apologize for the harmful things I published in relation to the [Israeli] president, the U.S. president, and other public officials,” Baratz said on his Facebook page, according to a translation. “Things that I published were written in jest, and with a jocular tone, in a language that works for social networks and as a private person. It is clear to me that a governmental officials should behave and express themselves differently. I asked the prime minister for chance to clarify things with him in the coming days.”

The controversy comes ahead of Netanyahu’s Nov. 9 meeting with Obama at the White House, the first gathering of the two leaders since they engaged in the protracted Iran deal feud. On the trip, Netanyahu will work to burnish Israel’s bipartisan support in the United States by holding events at both the conservative American Enterprise Institute (AEI) and the liberal Center for American Progress (CAP). At CAP, a think tank with numerous ties to Bill and Hillary Clinton, current and former staffers have complained that hosting Netanyahu would give the right-wing leader “bipartisan cover.” Officially, the organization says the event is an opportunity to “hold a conversation with [Netanyahu] on a range of issues, including Iran, Israeli-Palestinian relations, regional concerns, and ways to strengthen the partnership between Israel and the United States.” Separately on Thursday, The Intercept published leaked internal emails of CAP leaders in 2012 expressing concern about criticizing Israel for fear of upsetting some of the group’s biggest donors.

At the White House briefing, Earnest said the recent flare up over Baratz’s remarks should not prevent a constructive discussion with the prime minister next week. “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,” he said.

In a call with reporters on Thursday, White House officials said the president’s bilateral meeting with Netanyahu would involve discussions on security cooperation, the implementation of the Iran nuclear deal, Israel-Palestine relations and the situation in Syria.