Armenia and Turkey have pledged to overcome decades of enmity and disagreement over the massacre of Armenians by Ottoman forces.
Abdullah Gul became the first Turkish president to visit Armenia on Saturday, attending a football match in Yerevan and meeting Serzh Sarkisian, his Armenian counterpart.
The two agreed there was the "political will" to improve ties frozen for decades over the 1915-1917 massacres carried out by Turkish troops.
"I believe that my visit was fruitful and that it promises hope for the future," Gul said after returning to Ankara.
"I was happy to see that we were unanimous with the Armenian side on the need for mutual dialogue to remove barriers to improving bilateral ties."
Sarkisian said earlier there was a "political will to decide the questions between our countries, so that these problems are not passed on to the next generation".
Protests
But tensions remain between the two countries and security was tight during Gul's visit.
Several hundred angry protesters lined the route of Gul's motorcade, holding aloft the Armenian flag and nationalist emblems.
At the start of the match about 80 young protesters gathered at a monument to victims of the killings in central Yerevan, laying flowers and lighting torches.
"We want to draw [Gul's] attention to this monument, so he knows it is not standing empty and that people have gathered here to show that the young generation remembers everything," said Airapet Babaian, the protest organizer.
The Turkish president's arrival at Yerevan's Hrazdan stadium was greeted by boos and hisses by Armenian fans and Gul watched the match from behind a special bullet-proof area.
The far stronger Turkish side ended up winning the match 2-0.
Troubled relations
Turkey and Armenia have no diplomatic relations and have waged a diplomatic battle over Yerevan's efforts to have the 1915-1917 massacre of hundreds of thousands of Armenians recognized as genocide.
Armenians say up to 1.5 million of their people were killed between 1915 and 1917 in orchestrated massacres during the First World War as the Ottoman Empire collapsed, a claim supported by several other countries.
Turkey rejects the label of "genocide", arguing that 300,000-500,000 Armenians and at least as many Turks died in civil strife when Armenians took up arms for independence in eastern Anatolia and sided with invading Russian troops.
Turkey's footballers were supported by only about 200 fans in a seating area that could have held 10 times more and was ringed by Armenian police.
PHOTO CAPTION
Armenians protest against the presence of Turkish President Abdullah Gul in Armenia, on September 6, while he meets his Armenian counterpart Serzh Sarkisian, in Yerevan.
Al-Jazeera