Turkey's President Recep Tayyip Erdogan says he backs Azerbaijan "to the end" amid its clashes with Armenians over the disputed Nagorno-Karabakh region.
"We pray our Azerbaijani brothers will prevail in these clashes," the presidency quoted him as saying.
Fighting has continued into Sunday, after clashes left at least 30 soldiers dead and caused civilian casualties.
Nagorno-Karabakh has been in the hands of ethnic-Armenian separatists since a war that ended in 1994.
The BBC's Reyhan Demytrie in Tbilisi says there have long been fears that hostilities between the two nations, which are highly militarised and possess sophisticated weaponry, could spiral out of control.
Turkey has close ties to Baku but does not have relations with Yerevan because of the dispute over mass killings of Armenians during the Ottoman era, which Armenia says was a genocide. Turkey staunchly denies this.
The situation on the front line remains tense, with each side accusing the other of firing heavy weapons, rockets and artillery.
On Saturday Armenia said 18 ethnic-Armenian troops died, while Azerbaijan said it had lost 12 troops. The Karabakh defence ministry said a 12-year-old boy had been killed and two other children injured.
Each side blamed the other for breaking the ceasefire. Azerbaijan said its forces had taken over two strategic hills and a village but lost a helicopter. The Armenian government said Azerbaijan had launched a "massive attack" with tanks, artillery and helicopters.
Mr Erdogan also criticised the Minsk Group - a body under the Organization for Security and Co-operation in Europe (OSCE), chaired by the US, Russia and France and tasked with resolving the conflict.
He said it had "underestimated" the situation.
"If the Minsk Group had taken fair and decisive steps over this, such incidents would not have happened. However, the weaknesses of the Minsk Group unfortunately led the situation to this point," he told an Azeri reporter during his trip to the US, the presidency said.
The OSCE has called for an end to the fighting. Russia, which has sold arms to both sides, has also called for an immediate ceasefire and for both sides to exercise restraint.
Fighting between the two sides began in the late 1980s and escalated into full-scale war in 1991 as the Soviet Union collapsed, killing about 30,000 people before a ceasefire in 1994.
The region, which lies inside Azerbaijan but is controlled by ethnic Armenians, has since run its own affairs with Armenian military and financial backing, but clashes break out on a regular basis.
BBC Azeri's Konul Khalilova says leaders on both sides have been blamed for stoking the conflict to stay in power rather than seeking peace.
Frozen conflict over Nagorno-Karabakh
- The conflict has roots dating back over a century to competition between Christian Armenian and Muslim Turkic and Persian influences
- Frictions exploded into violence when the region's parliament voted to join Armenia in the late 1980s
- The ethnic Azeri population - about 25% of the total before the war - fled Karabakh and Armenia while ethnic Armenians fled the rest of Azerbaijan
- Russian-brokered ceasefire signed in 1994, leaving Karabakh and swathes of Azeri territory around the enclave in Armenian hands
- Progress on a peace process stalled after talks between Armenian and Azeri leaders in 2009. Serious ceasefire violations have followed
- Karabakh is a word of Turkic and Persian origin meaning "black garden", while "Nagorno" is a Russian word meaning "mountain"
Are you in Nagorno-Karabakh? Share your experiences and photos with us if it is safe to do so. Email email@example.com with your stories.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: