WARSAW, Poland — The presidents of Israel and Poland joined thousands of others Thursday for a Holocaust remembrance event at the former Nazi death camps of Auschwitz and Birkenau, hoping to put recent tensions behind them.

Presidents Reuven Rivlin of Israel and Andrzej Duda of Poland lit candles, bowed their heads and pressed their hands on the Death Wall, a site at Auschwitz where inmates, chiefly Polish resistance fighters, were executed by Nazi German forces during World War II.

They then led thousands, including many young Jews from around the world, in the March of the Living, which takes place each year on Israel’s Holocaust Remembrance Day.

The solemn march began at the main gate of Auschwitz and ended 2 miles away at Birkenau, where Jews from across Europe were transported by train and murdered in gas chambers.

Duda said he and Rivlin were there to give testimony to the destruction of the Jewish people and warn about where anti-Semitism, xenophobia and racism can lead. “Our common presence here shows the world: Never again anti-Semitism, never again genocide, never again Holocaust,” Duda said during a joint news conference.

Rivlin recalled how Poland was the cradle of Jewish culture before the Holocaust. But he also referred to the “deep disagreement” his country has had with Poland over its passage earlier this year of a Holocaust speech law.

The law criminalizes blaming Poland for crimes committed by Nazi German forces during their wartime occupation. The Polish government says its aim is to prevent Poland from unfairly being blamed for Germany’s crimes.

Israel fears the law’s true intent is to whitewash Polish sins by repressing discussion about those Poles who helped the Germans kill Jews.

Duda, whose wife has a Jewish father, insisted the disputed law never aimed to “block testimony” about the Holocaust.

“Just the opposite. We want to defend historical truth,” Duda said. “I as Polish president want to defend this truth with all my power, including those elements that are difficult for Poles.”

Jews and ethnic Poles were among those who suffered most during the German occupation.