A law enforcement officer guards a yard with an unexploded shell next to a house during armed clashes on the border between Azerbaijan and Armenia, in the village of Agdam, Azerbaijan July 15, 2020.

Armenia and Azerbaijan agreed on Tuesday to a ceasefire at their border, the Armenian Defense Ministry said, after Russia urged them to step back from confrontation following the deadliest clash since a war last year.

Armenia had asked Moscow to help defend it after the worst fighting since a 44-day war last year between ethnic Armenian forces and the Azeri army over the Nagorno-Karabakh enclave that killed at least 6,500 people.

That conflict ended after Russia, which has a military base in Armenia, brokered a peace deal and deployed almost 2,000 peacekeepers to the region. Turkey took the side of Azerbaijan, which regained swathes of land it lost in an earlier conflict.

“In accordance with an agreement mediated by the Russian side, fire ceased on the eastern section of the Armenian-Azeri border, and the situation is relatively stable,” Armenia’s Defense Ministry said.

Azerbaijan’s Defense Ministry did not immediately reply to a Reuters’ request for comment.

Earlier on Tuesday, Russian President Vladimir Putin and Armenian Prime Minister Nikol Pashinyan discussed the situation on the border by phone, the Kremlin said.

Russian Defense Minister Sergei Shoigu also spoke by phone to the Armenian and Azeri defense ministers by phone, Interfax news agency said.

The Armenian Defense Ministry said its troops had come under fire from Azerbaijan and that 12 of its soldiers were captured, while two combat positions near the border with Azerbaijan were lost.

Eduard Aghajanian, head of the Armenian Parliament’s foreign relations committee said 15 Armenian soldiers had been killed.

The Azeri Defense Ministry said it had responded to large-scale “provocations” after Armenian forces shelled Azeri army positions, and that its own operation had been successful.

The French foreign ministry had said it was very concerned about the deteriorating situation and called on both countries to respect a ceasefire.