BAKU  - Armenia agreed on Thursday not to block Azerbaijan's candidacy to host next year's COP29 U.N. climate conference as part of a series of mutual goodwill gestures intended to promote reconciliation between the estranged South Caucasus neighbours.

The move could not only resolve a problem hanging over the COP28 forum under way in Dubai but also point to greater trust between Yerevan and Baku after Azerbaijan in September seized the breakaway Nagorno-Karabakh region from the ethnic Armenians who had controlled it.

A joint statement from both administrations said Azerbaijan would release 32 captured Armenian service members and Armenia would free two Azerbaijani soldiers.

“The two countries reconfirm their intention to normalise relations and to reach a peace treaty on the basis of respect for the principles of sovereignty and territorial integrity," it said.

The U.S. State Department said on Thursday that it welcomed the release of the soldiers, adding the commitment represented "an important confidence building measure as the sides work to finalize a peace agreement and normalize relation."

Armenia and Azerbaijan have been at odds for more than three decades over Nagorno-Karabakh, which had freed itself from Baku's control in a bloody ethnic conflict that accompanied the 1991 collapse of the Soviet Union, surviving with financial, military and diplomatic support from Yerevan.

When Azerbaijani forces mounted their lightning offensive, which prompted almost all Karabakh's population of around 120,000 to flee to Armenia, Armenian Prime Minister Nikol Pashinyan resisted domestic pressure to intervene.

He had already verbally recognised the territory as part of Azerbaijan, in line with international practice, even as repeated attempts at peace talks, often with international support, led nowhere and border skirmishes erupted regularly.

Faced in September with a militarily stronger opponent and with a seemingly indifferent ally in Russia, he said his country needed peace more than anything to secure its sovereignty and prosperity.

"The Republic of Armenia and the Republic of Azerbaijan share the view that there is a historic chance to achieve a long-awaited peace in the region," the joint statement said. "An agreement has been reached on taking tangible steps towards building confidence between two countries."

The neighbours said discussions would continue on implementing more confidence-building measures.

Azerbaijan, which had on Wednesday received U.S. Assistant Secretary of State James O'Brien, said it was prepared to accept an offer by U.S. Secretary of State Antony Blinken to host talks between the countries' foreign ministers in Washington.

(Reporting by Nailia Bagirova; Writing by Kevin Liffey; Editing by Mark Heinrich and Lisa Shumaker)