Guinea and Sierra Leone have agreed to pull back troops from their disputed border, Guinea's foreign minister Edouard Nyankoi Lamah has said.
The two sides have pledged to resolve the dispute over control of Yenga town through dialogue, he said.
Guinean troops entered Yenga more than a decade ago, to help the Sierra Leonean army fight rebels.
They refused to hand the town back to the Sierra Leonean government after defeating the uprising.
Mr Lamah, speaking after a trip to Freetown, said the two governments had agreed to demilitarise the area.
"The first point is to demilitarise the zone - that is to say the Sierra Leone army reverts back to its own territory and the Guinean army also reverts to its own territory," he said.
"The second point is that both armies should together work out the modalities on how this buffer zone will be demarcated."
He said Sierra Leone and Guinea would set up committees - assisted by experts from Britain and France, the former colonial powers - to help find an agreement.
"These committees should help us demarcate the borders and show either country which is their territory," Mr Lamah said.
Sierra Leone's ambassador to Guinea, Adikali Suma, said both countries were determined to avoid confrontation.
"It is necessary to put all other things aside and resolve this issue diplomatically," he said.
In 2005, Sierra Leone and Guinea signed an agreement confirming Yenga - a tiny town on the banks of the Makona River - belonged to Sierra Leone.
However, Guinean troops have remained in the town.