JERUSALEM — Philippine President Rodrigo Duterte, who once compared himself favorably to Adolf Hitler, paid a solemn visit to Israel's national Holocaust memorial on Monday, branding the Nazi leader "insane" as he lamented the genocide of 6 million Jews.

The comments marked a dramatic turnaround for Duterte, who just two years ago had compared his anti-drug campaign to the Holocaust and said he would be "happy to slaughter" 3 million addicts. He later apologized.

Duterte, known for his profane outbursts and accused of committing widespread human rights abuses, spoke quietly and respectfully during his stop at the Yad Vashem memorial. He said the Holocaust should never be repeated and that "despots" have no place in the modern world.

"I could not imagine a country obeying an insane leader, and I could not ever fathom the spectacle of the human being going into a killing spree, murdering old men, women and children. I hope this will not happen again," he said.

"There is always a lesson to learn: that despots and leaders who show insanity, they should be disposed of at the first instance," he said.

Duterte, the first Philippine president to visit Israel, has received a warm welcome from the government, despite criticism that it is embracing a leader accused of rights abuses in his deadly crackdown on drug dealers.

The agenda reportedly is expected to include an arms sale to the Philippines. Israel agreed in the past to sell assault rifles to the Philippines national police force.

Israeli Prime Minister Benjamin Netanyahu remarked Monday on the countries' long friendship. He said the Philippines took in Jewish refugees after World War II and was the only Asian nation to vote for Israel's establishment. He noted that Filipino health aides now assist the elderly in Israel, including Netanyahu's father.

"We remember our friends, and that friendship has blossomed over the years and especially over the last few years," Netanyahu told Duterte. "There has been a remarkable phenomenon in Israel where thousands and thousands of families have taken heart from the support given by Filipino caretakers for the elderly."

Duterte thanked Israel for hosting some 28,000 Filipino workers and for assisting his country in times of need.

"We share the same passion for peace. We share the same passion for human beings. But also we share the same passion of not allowing our country to be destroyed by those who have the corrupt ideology, who know nothing but to kill and destroy," he said at a joint appearance with Netanyahu. "And in this sense, Israel can expect any help that the Philippines can extend to your country."

The two countries established diplomatic relations in 1957. Netanyahu has worked to cultivate new allies in Asia, Africa and Latin America, where many countries have historically sided with the Palestinians in their conflict with Israel, to help chip away at the number of anti-Israel votes at the United Nations.

But Netanyahu has come under fire for embracing Duterte, a 73-year-old former government prosecutor whose forces are accused of killing thousands in anti-drug raids since he took office in 2016.

Duterte drew outrage that year when he compared his anti-drug campaign to the Holocaust and himself to Hitler. More recently, he forcibly kissed a woman on stage and said there would be many rape cases in a Philippine city "if there were many beautiful women."

In its lead editorial Monday, the liberal Haaretz daily accused Netanyahu of selling out Israeli values for dubious allies.

"Under the shadow of Duterte's visit, Israel once again proves it's willing to overlook leaders' human rights violations for the sake of opportunities for arms deals and defense contracts," the newspaper said.

Duterte, who calls U.S. President Donald Trump a friend and in 2016 cursed President Barack Obama for alleged meddling, offered the former occupant of the White House an apology of sorts.

"I said, 'Son of a bitch, Obama you can go to hell. You son of a bitch.' I said that because he was not a civilized person," Duterte said in Israel. "It would be appropriate also to say at this time to Mr. Obama that, 'You are now a civilian and I am sorry for uttering those words.'"

Duterte has been criticized for a brutal crackdown on the Philippine drug trade. Reports of extrajudicial slayings of alleged dealers surfaced during Obama's presidency.

Official Philippine police tallies put the number of suspects killed in police-led drug raids at more than 4,500 since Duterte took office.

International human rights watchdogs have cited far higher death tolls. Duterte denies condoning extrajudicial killings, but has openly threatened drug dealers with death.

His visit to Israel was to include a stop at a monument commemorating the Philippines' rescue of Jews during the Holocaust.