German President Frank-Walter Steinmeier spoke of "cautious optimism" in the Middle East after talks in Cairo with Lebanese Prime Minister Najib Mikati and Egyptian President Abdel-Fattah al-Sisi.
Steinmeier said people in the region hope the peace process in the Gaza Strip will continue, following the ceasefire between Israel and the Palestinian Islamist group Hamas last month.
"But many are not underestimating the difficulties that still lie ahead, especially in this region," he added.
The German president arrived in Egypt on Saturday to begin an almost week-long trip to Africa. Along with several other world leaders, he attended the official opening of the Grand Egyptian Museum in Cairo, located near the Giza pyramids.
Steinmeier held bilateral talks with Mikati on Saturday and with al-Sisi on Sunday.
Before meeting with al-Sisi, Steinmeier said: "We hope that the world will not only observe how this process unfolds, but also help to transform this fragile ceasefire into lasting stability."
He said the German government has already pledged to help with the reconstruction of the Gaza Strip.
Steinmeier praised the Grand Egyptian Museum, saying "its significance cannot be overstated."
"What the Egyptian people have achieved here in just a few years is remarkable," he added.
The German president is also scheduled to visit Ghana and Angola. According to his office, Steinmeier aims to acknowledge these two countries' regional commitment to stability and peace in West Africa.
He said political partnerships would be strengthened, and cooperation in the areas of economy, science, and culture would be expanded.