ARMENIA has warned Azerbaijan it is ready for war as tensions soared between the ex-Soviet foes after Baku pardoned and promoted an Azerbaijani officer who axed an Armenian soldier to death.

Azerbaijan President Ilham Aliyev last week immediately pardoned Ramil Safarov after he was extradited from Hungary, where he had been serving a life sentence for the 2004 killing.

Safarov was also promoted to the rank of major, given a house and eight years' worth of back-pay after returning home to a hero's welcome, in defiance of assurances from Baku to Budapest that he would serve out his term in Azerbaijan.

"We don't want a war, but if we have to, we will fight and win. We are not afraid of killers, even if they enjoy the protection of the head of state," Armenian President Serzh Sarkisian fumed in a statement late on Sunday.

"They (Azerbaijanis) have been warned," he said, calling Azerbaijan a country where "illicit orders set free and publicly glorify every bastard who kills people only because they are Armenians".

Safarov hacked Armenian officer Gurgen Margarian to death at a military academy in Budapest where the servicemen were attending English-language courses organised by NATO.

His lawyers claimed in court that he was traumatised because some of his relatives had been killed during Azerbaijan's war with Armenia, and alleged that Margarian had insulted his country.

Armenia and Azerbaijan are locked in a long-running conflict over the disputed region of Nagorno-Karabakh, where they fought a war in the 1990s.

Armenia-backed separatists seized Nagorno-Karabakh from Azerbaijan in the war that left some 30,000 people dead.

The two sides have not signed a final peace deal since the 1994 ceasefire and there are still regular firefights along the front line. Analysts warn the frozen conflict risks slipping again into full-scale war.

Russia, which is part of the OSCE Minsk Group that is mediating in negotiations to find a peaceful solution to the Karabakh conflict, expressed "deep concern" over the extradition and pardon.

Yerevan on Friday cut diplomatic ties with Hungary over the pardon, while US President Barack Obama said he was "deeply concerned" about the incident.

Hungary summoned Azerbaijan's ambassador on Sunday to protest at Baku's decision after earlier saying it had been assured Safarov would serve out his term.

Originally published as Armenia furious over Azerbaijan axe killer