By Jon Leyne
BBC News, Naqoura, southern Lebanon
At the UN headquarters beside the Mediterranean in southern Lebanon, Kofi Annan came to honour a peacekeeping mission that so often finds itself in the firing line.
The UN post at Naqoura is barely a kilometre from the Israeli border.
Kofi Annan's Mid-East trip could be his last major mission as UN head
Beside it is a sleepy fishing harbour used to bring in supplies and reinforcements.
The multinational peacekeepers stationed here since 1978 have witnessed a violent succession of conflicts, from the Lebanese civil war to the recent month of intense fighting between Israel and Hezbollah.
A total of 248 peacekeepers have died in that time. Most recently, four were killed when the Israelis shelled their base at Khiam on 25 July. Today their photographs were on display, together with two UN civilian workers who died in Tyre.
At the simple memorial inside the well-kept base, the UN secretary general laid a wreath and inspected a guard of honour mounted by the peacekeepers.
Mr Annan praised members of the peacekeeping force for remaining at their posts throughout the recent fighting, sometimes surviving on just half a bottle of water a day.
They had refused any suggestion that they evacuate their positions, he said, even when the battles were continuing all around them.
Thousands of reinforcements will soon be passing through this base, as they attempt to consolidate the two-week-old ceasefire.
They will be well-armed troops, many from Western European countries, and they will also be armed with a tougher mandate, allowing them more flexibility to open fire.
Scores of peacekeepers have died in Lebanon in nearly three decades
But Mr Annan knows, like everyone here, that no UN force could ever impose peace on southern Lebanon.
It will depend on the intentions of Israel, the Lebanese government and Hezbollah.
Speaking at the base, Mr Annan stressed the need to resolve the immediate outstanding issues.
He called for the release of the two Israeli soldiers whose capture by Hezbollah sparked the conflict. And Mr Annan called for Israeli to lift the air and sea embargo on Lebanon, which he said was a major problem for the country.
But the secretary general outlined a more ambitious goal.
"We do have a chance to turn this into a permanent ceasefire," he said, "and with a political framework, to build a peaceful Lebanon, with peaceful relations between Lebanon and Israel.
"We don't want to go back to a situation where we can have an explosion like this in six months or six years. Let's make sure this time it's for good."
On what could be his last major mission as secretary general, Mr Annan is coming to the Middle East at one of its darker times.
He will be hoping that his calm presence will help reignite the sort of diplomatic process that seems almost to have been abandoned in recent months and years.