Azerbaijan has admitted mistakenly shooting down a Russian Mi-24 military helicopter over Armenia, killing two crew members and injuring a third.
In a statement, Azerbaijan apologised, offering to pay compensation.
Russia said a missile downed its Mi-24 accompanying a column of Russian troops in Armenia, where Russia has a base.
It comes amid fierce fighting between Azerbaijan and Armenian separatists for Nagorno-Karabakh. But the helicopter was not downed near those clashes.
Nagorno-Karabakh is internationally recognised as part of Azerbaijan, but has been run by ethnic Armenians since 1994.
What is known about Monday's downing?
In the statement, Azerbaijan's foreign ministry said the Russian Mi-24 was shot down at 18:30 local time "on the Nakhchivan section of the Armenia-Azerbaijan state border".
The Nakhchivan Autonomous Republic is Azerbaijan's western landlocked exclave, bordering Armenia, Iran and Turkey.
Azerbaijan's foreign ministry said the helicopter had been flying at a low altitude during hours of darkness, and outside "the air defence radar detection zone".
It said that "Russian Air Force helicopters have not been seen in the specified area before".
In the context of these and other factors, "the combat crew on duty took the decision to open fire," the statement said.
The Russian defence ministry said its Mi-24 was shot down by a missile as it was accompanying a column of vehicles belonging to the 102nd Russian military base.
It said this happened near the town of Yeraskh. The helicopter lost control and crashed in a mountainous area on Armenian territory.
The Russia foreign ministry later tweeted: "We regard positively the fact that Baku recognised that it was to blame without delay."
It also said that Azerbaijan had pledged to carry out a speedy investigation into the incident and those responsible would be punished.
Men with torches combing crash site
By BBC Russian's Yuri Vendik, Yeraskh, Armenia
It's pitch dark at the site of the downed Russian helicopter near the Armenian town of Yeraskh.
The area is sealed off but we are able to hear heavy machinery working at the site.
I've been told that military police and Russian and Armenian military prosecutors are here, too. I can see men with torches working in the cordoned-off field.
Yeraskh is about 70 km (40 miles) from Yerevan and about 150 km from Nagorno-Karabakh.
The Turkish-Armenian border, however, is very near - the lights in the distance are on the Turkish side.
The Azerbaijani exclave of Nakhchivan is also close - just on the other side of the hills.
Azerbaijan has apologised profusely for this error, describing it as tragic, and offered to compensate all losses.
This is the first confirmed incident of this kind involving Russia since the Nagorno-Karabakh conflict flared up in September.
What's the geopolitical context in South Caucasus?
Russia has a military base in Armenia, and the two countries are also members of the Moscow-led Collective Security Treaty Organization.
The treaty envisages Russia's military support if Armenia is attacked - but it does not include Nagorno-Karabakh or the other Azerbaijani regions around it seized by Armenian forces.
At the same time, Moscow also has strong ties to Azerbaijan, which is being openly backed by Turkey, a Nato member.
In addition, Russia has been selling weapons to both Armenia and Azerbaijan.