Relations between the two cities have been soured by Belgrade's role in the 1992-95 Bosnian war, including the siege of Sarajevo by Bosnian Serb forces in which 10,000 people were killed.
This caused a strong resentment towards Belgrade on the part of Sarajevans, while Serbian nationalists decried any contact with Sarajevo as treason.
Alija Behmen and Dragan Djilas, the mayors of the Bosnian and Serbian capitals respectively, spoke for about half an hour and said that people in Bosnia and Serbia have much in common.
"There is a common history that links us: there's culture, art, science. I think we should concentrate on developing such ties and of course economic ties," Behmen said.
Djilas said it was important to live as good neighbors.
"There is no progress without that both for Serbia and Bosnia. I think everybody understands that. I travelled to Sarajevo after the war finished and I never had problems at all, and I was one of the first to go there. Every taxi driver always asked me when they heard I was from Belgrade how are things in Belgrade, they were always kind," Djilas said.
He added it was very important for relations between the two that the Serbian parliament adopted a resolution condemning the massacre of 8,000 Bosniak (Bosnian Muslim) men.
"This would help people in Serbia and Belgrade realize what happened there," Belgrade's mayor said.
The two mayors also agreed that the fact that Bosnia has not had an ambassador in Belgrade for two years because Belgrade has rejected diplomats chosen in Sarajevo was not good for mutual relations.
Djilas accepted Behmen's invitation to visit Sarajevo and said he expected Behmen in Belgrade.
-- Nedim Dervisbegovic