Arch-foes Armenia and Azerbaijan said Thursday they would exchange prisoners of war and work towards normalising their relations, in a joint statement hailed by the European Union and the United States as a breakthrough after three decades of conflict over disputed territory.

The Caucasus neighbours have long fought over the Nagorno-Karabakh region, which Azerbaijan reclaimed after a lightning offensive against Armenian separatists in September.

Both countries have said a peace agreement could be signed by the end of the year, but peace talks -- mediated separately by the European Union, the United States and Russia -- have seen little progress.

The two sides agreed in Thursday's joint statement to seize "a historical chance to achieve a long-awaited peace in the region".

"The two countries reconfirm their intention to normalize relations and to reach the peace treaty," the statement said.

Baku will free 32 Armenian prisoners of war, while Yerevan will release two Azerbaijani servicemen, according to the statement.

They also agreed to continue discussions on "more confidence building measures, effective in the near future".

- COP29 -

As a sign of good faith, Armenia announced it was withdrawing its bid to host UN-led climate talks next year, paving the way for Azerbaijan's candidacy.

The annual negotiations on fighting climate change, known as COPs, rotate among regions and were due to be hosted by an Eastern European country in 2024 after this year's COP28 in Dubai.

"As a sign of good gesture, the Republic of Armenia supports the bid of the Republic of Azerbaijan to host (COP29) by withdrawing its own candidacy," the statement read.

"Armenia and the Republic of Azerbaijan do hope that the other countries within the Eastern European Group will also support Azerbaijan's bid to host."

A grouping of Eastern European nations must unanimously choose the COP29 host, but Russia is reportedly opposing an EU member holding the event as tensions with the bloc run high during the war in Ukraine.

Non-EU countries Armenia and Azerbaijan were both seen as candidates, but Baku's offensive in Nagorno-Karabakh has escalated tensions with Moscow.

- 'Key step' -

Armenia's foreign ministry said Yerevan had "responded positively to the offer of US Secretary of State Antony Blinken to organise the meeting of the Foreign Ministers of Armenia and Azerbaijan in Washington".

EU Council President Charles Michel praised the statement, calling it a "key step".

"Delighted to welcome a major breakthrough in Armenia-Azerbaijan relations as they issue a joint statement," he wrote on social media.

The United States also welcomed the steps by the two countries.

"This commitment represents an important confidence building measure as the sides work to finalize a peace agreement and normalize relations," State Department spokesman Matthew Miller said in a statement Thursday.

- Stalled talks -

Armenian Prime Minister Nikol Pashinyan and Azerbaijan President Ilham Aliyev have met several times for normalisation talks mediated by the EU.

But the process stalled over the last two months as two negotiation rounds failed to take place.

Azerbaijan refused to participate in talks with Armenia that were planned in the United States on November 20, over what it said was Washington's "biased" position.

In October, Aliyev declined to attend negotiations with Pashinyan in Spain, that time accusing France of bias.

French President Emmanuel Macron and German Chancellor Olaf Scholz had been scheduled to join Michel as mediators at those talks.

There has been no visible progress so far in EU efforts to organise a fresh round of negotiations.

The traditional regional power broker Russia has seen its influence wane in the Caucasus.

Aliyev sent troops to Karabakh on September 19, and after just one day of fighting, Armenian separatist forces that had controlled the disputed region for three decades laid down arms and agreed to reintegrate with Baku.

Almost the entire Armenian population of the mountainous enclave -- more than 100,000 people -- fled Karabakh for Armenia, sparking a refugee crisis.

Azerbaijan's victory marked the end of the territorial dispute, which led to two wars in 2020 and the 1990s that claimed tens of thousands of lives from both sides.