The presidents of Armenia and Azerbaijan met Friday in the Russian city of Kazan to see whether they could finally agree to begin peace talks over a region that has been disputed since the two countries fought a war nearly 20 years ago. They couldn’t.

At issue was Nagorno Karabakh, an unrecognized enclave within Azerbaijan run by ethnic Armenians. Russia, the United States and France have been pushing the two sides to negotiate for years, even as they continue to trade shots over the border. Friday’s meeting was sponsored by Russian President Dmitry Medvedev, and President Obama called the two leaders Thursday urging them to reach an agreement on the conduct of further talks. But after more than three hours they broke up without a resolution.

Lower-level talks were continuing Friday night.

“The two sides are simply too far apart, but the meeting is a helpful strengthening of diplomacy over war,” said Richard Giragosian, director of the Regional Studies Center in Yerevan, Armenia.

Each side has been stepping up its threats toward the other recently, to the alarm of Russian, American and European officials who have no desire to see an escalation of the fighting in a region close to Georgia, Iran and the Caspian oil fields.

“War by miscalculation” is the biggest danger, Thomas de Waal of the Carnegie Endowment for International Peace said Friday night. “Obviously, time is beginning to run out on Medvedev’s initiative. It doesn’t look good.”