BAKU, Azerbaijan -- Azerbaijan and Armenia on Thursday accused each other of violating a two-day-old cease-fire in Nagorno-Karabakh, while Russia and Iran joined diplomatic efforts to prevent a war that could destabilize the strategic Caucasus region.

Azerbaijan's Defence Ministry said its troops returned fire after Armenian forces fired mortars and large-calibremachine-guns at Azerbaijani military positions and populated areas. The Armenian side accused Azerbaijan of shelling its positions.

The intense skirmishes have threatened to derail the Russia-brokered cease-fire declared at midday Tuesday following the worst violence since a separatist war ended in 1994. That conflict left Nagorno-Karabakh, officially a part of Azerbaijan, under the control of local ethnic Armenian forces and the Armenian military. Armenian forces also occupy several areas outside the Karabakh region.

Azerbaijan's Defence Ministry has said 31 of its soldiers have been killed since Saturday; Karabakh has acknowledged the loss of 30 and said 101 others have been wounded. Each party put enemy losses in the hundreds, claims that couldn't be independently verified. Several civilians also have been killed on both sides.

The fighting has raised fears of a possible regional escalation, with Turkey strongly backing Azerbaijan and Russia obliged by a mutual security pact to protect Armenia.

Russia also has sought to maintain friendly ties with energy-rich Azerbaijan and given it weapons in a bid to shore up its influence in the Caucasus region, a conduit for energy resources from the Caspian Sea to the West.

Russia also has acted as a mediator in the Nagorno-Karabakh peace talks along with the United States and France, which have dragged on since 1994 without any visible results.

But Russian Prime Minister Dmitry Medvedev said Thursday after a meeting with his Armenian counterpart that "there is no alternative to the current mechanism" for negotiating an end to the dispute, which is under the auspices of the Organization for Security and Cooperation in Europe.

It was not clear whether that stance would marginalize Iran's role.

In Baku, Russian Foreign Minister Sergey Lavrov voiced hope that the cease-fire will hold and emphasized the need to get a political settlement.

"Practically all components of an agreement are already on the table," he said following talks with his counterparts from Azerbaijan and Iran in Baku, Azerbaijan's capital.

Lavrov will talk about a diplomatic solution during meetings Friday with Armenia's foreign minister.

For Iran, the Baku meeting was a chance to improve its sanction-stricken economic ties with neighbouring countries. During their joint news conference, Iranian Foreign Minister Mohammad Javad Zarif focused on plans to boost co-operation with Azerbaijan and Russia on transport, energy and security issues.

Avet Demourian in Yerevan, Armenia, Nasser Karimi in Tehran, Iran, and Vladimir Isachenkov in Moscow contributed to this report