BUCHENWALD, Germany (CNN) -- President Barack Obama made an emotional visit to the former Nazi concentration camp at Buchenwald, Germany, Friday, saying that the camp should serve as a reminder of humanity's duty to fight the spread of evil.
President Obama visits Buchenwald with Chancellor Angela Merkel, left, and survivor and activist Elie Wiesel.
The visit had personal significance for the president, whose great-uncle helped liberate prisoners from the camp during World War II.
"I will not forget what I've seen here today," Obama said after touring the camp with German Chancellor Angela Merkel; Holocaust survivor and Nobel Peace Prize laureate Elie Wiesel, and survivor Bertrand Herz.
"These sites have not lose their horror with the passage of time," Obama said. "This place teaches us that we must be ever vigilant about the spread of evil in our times. ... We have to guard against cruelty in ourselves ...." Watch Obama honor Holocaust victims »
Wiesel, whose father died at Buchenwald, was imprisoned at the camp during the final months of the war in 1945.
"Every war is absurd and meaningless," Wiesel said. "The world hasn't learned. ... Had the world learned, there would have been no Cambodia and no Rwanda and no Darfur and no Bosnia."
Like Obama, Wiesel stressed that the lessons of Buchenwald are that humanity must unite to keep such atrocities from happening again and work toward making the 21st century "filled with promise and infinite hope."
"Memory must bring people together, rather than set them apart. Memories here not to sow anger in our hearts, but on the contrary, a sense of solidarity with all those who need us," Wiesel said.
Obama told reporters earlier in the day that his great-uncle, Charles Payne, had a "very difficult time re-adjusting to civilian life" after helping his Army division liberate the Ohrdruf forced labor camp, a subdivision of Buchenwald
"And it is now up to us, the living, in our work, wherever we are, to resist injustice and intolerance and indifference in whatever forms they may take and ensure that those who were lost here did not go in vain."
Later Friday, the president traveled in Germany to Ramstein Air Base and visited with wounded American troops at Landstuhl Regional Medical Center. He then moved on to Paris, France, ahead of D-Day commemoration services on Saturday.
Obama began his tour of the Middle East and Europe in Saudi Arabia on Wednesday, before moving on to Egypt, where on Thursday he delivered a key speech on American and Muslim relations.
In the 55-minute address -- billed as a fence-mending effort between the United States and Islam -- the president urged those in the Cairo audience and the people across the globe viewing the speech on television to enter a new, productive and peaceful chapter of relations.
CNN's Ed Henry contributed to this report.