Armenia says it is severing diplomatic ties with Hungary after the release of an Azeri army officer convicted of murdering an Armenian soldier.
The Azeri serviceman, Ramil Safarov, was given a life sentence for hacking Armenian Gurgen Markarian to death with an axe in 2004 in Budapest.
On Friday, Safarov was flown to Baku and pardoned, despite Baku's assurances that his sentence would be enforced.
Armenia and Azerbaijan fought a bitter war over an enclave in the early 1990s.
Armenia said on Friday that Hungary had made a "grave mistake" in sending Safarov back to Azerbaijan.
"With their joint actions, Azerbaijan and Hungary opened the door to the recurrence of such crimes," President Serzh Sarkisian said in comments release by his press office.
"I cannot put up with this. The republic of Armenia cannot put up with this," the president added.
The Hungarian authorities said they had returned Safarov to his homeland only after receiving assurances from the Baku government that his sentence would be enforced.
Safarov killed Gurgen Markarian at a military academy in Budapest, where both servicemen attended English-language courses organised by Nato.
During his trial in Hungary, Safarov said that the Azeri-Armenian war over Nagorno-Karabakh and insults from the Armenian officer were at the root of his actions.
Hungary and Azerbaijan have so far made no public comment on the case.
Azerbaijan and Armenia, both former Soviet republics, fought a war over the Nagorno-Karabakh enclave in the early 1990s, which left some 30,000 people dead, and displaced hundreds of thousands.
Armenia-backed authorities are currently controlling Nagorno-Karabakh, which lies within Azerbaijan.
Despite a 1994 ceasefire, skirmishes continue on the borders of the disputed territory.