Baku and Yerevan put themselves on a war footing after heavy fighting erupted on Sunday between Azerbaijan and Armenian separatists, claiming military and civilian casualties on both sides, including at least one child.

The worst clashes since 2016 have raised the spectre of a fresh war between arch-enemies Azerbaijan and Armenia which have been locked for decades in a territorial dispute over the Armenia-backed breakaway region of Nagorny Karabakh.

A major confrontation between the ex-Soviet Caucasus neighbours would draw in big regional players Moscow and Ankara.

Russia, France, Germany and the EU swiftly urged an “immediate ceasefire”, while Pope Francis prayed for peace.

The Armenian defence ministry spokesman, Artsrun Hovhannisyan, said intense fighting continued along the Karabakh frontline on Sunday afternoon.

Azerbaijan said it had captured seven of its Armenian-controlled villages, a claim Yerevan denied.

In a televised address to the nation earlier in the day, Azerbaijan President Ilham Aliyev vowed victory over Armenian forces.

“Our cause is just and we will win,” Aliyev said, repeating a famous quote from Soviet dictator Joseph Stalin’s address at the outbreak of World War II in Russia.

“Karabakh is Azerbaijan,” he said.

Both Armenia and the breakaway region of Nagorny Karabakh declared martial law and military mobilisation.

“Get ready to defend our sacred homeland,” Armenian Prime Minister Nikol Pashinyan said on Facebook.

Armenia said earlier on Sunday that Azerbaijan attacked civilian settlements in Nagorny Karabakh including the main city Stepanakert.

Azerbaijan accused Armenian forces of violating a ceasefire, saying it had launched a counter-offensive to “ensure the safety of the population”, using tanks, artillery missiles, combat aviation and drones.

“There are reports of dead and wounded among civilians and military servicemen. Extensive damage has been inflicted on many homes and civilian infrastructure,” Azerbaijan’s foreign ministry said.

Karabakh’s rights ombudsman Artak Beglaryan pointed to “civilian casualties”, while Armenia said a woman and child were killed.