YEREVAN, ARMENIA -- Fighting over the Nagorno-Karabakh region continued Sunday, but Armenia and Azerbaijan reiterated their commitment to a peaceful resolution of their decades-old conflict and agreed to a third attempt to establish a ceasefire after four weeks of hostilities.

The agreement on a truce set to begin at 8 a.m. (0400 GMT) Monday was announced in a joint statement by the governments of the United States, Armenia and Azerbaijan. Two previous Russia-brokered ceasefires, including one last weekend, frayed immediately after taking force, with both sides accusing each other of violations.

U.S. Secretary of State Mike Pompeo said in a tweet Sunday night that the U.S. facilitated "an intensive negotiation" and Armenian Foreign Minister Zohrab Mnatsakanyan and Azerbaijani Foreign Minister Jeyhun Bayramov "have committed to implement and abide by the ceasefire" that comes into force Monday.

Russia, the U.S. and France, co-chairs of the so-called Minsk Group set up by the Organization for Security and Cooperation in Europe to mediate the conflict, also took part in the talks, Pompeo said.

In a separate statement, co-chairs of the group said they would meet with the Armenian and Azerbaijani foreign ministers in Geneva on Thursday "to discuss, reach agreement on, and begin implementation ... of all steps necessary to achieve a peaceful settlement of the Nagorno-Karabakh conflict."

Nagorno-Karabakh lies within Azerbaijan but has been under the control of ethnic Armenian forces backed by Armenia since a war there ended in 1994. The latest fighting that began Sept. 27 has involved heavy artillery, rockets and drones, killing hundreds in the largest escalation of hostilities between the South Caucasus neighbours in more than a quarter-century.

The deadly clashes have continued despite numerous calls for the cessation of hostilities and the two attempts at establishing a ceasefire.

UN Secretary-General Antonio Guterres welcomed the cease-fire agreement and reiterated his appeal to Armenia and Azerbaijan to fully implement it without delay and "resume substantive negotiations without preconditions," UN spokesman Stephane Dujarric said.

The UN chief urged the parties to allow unimpeded humanitarian access to Nagorno-Karabakh to deliver aid and "to make concrete steps towards a peaceful resolution of the Nagorno-Karabakh conflict," Dujarric said.

According to Nagorno-Karabakh officials, 974 of their troops and 37 civilians have been killed in the clashes so far. Azerbaijani authorities haven't disclosed their military losses, but say the fighting has killed 65 civilians and wounded 300.

Russian President Vladimir Putin said Thursday that according to Moscow's information, the death toll from the fighting was nearing 5,000, significantly higher than what both sides report.

On Friday, Pompeo hosted the Armenian and Azerbaijan foreign ministers for separate talks, but the fighting raged on unabated.

On Sunday morning, the Nagorno-Karabakh army said battles continued "on all directions of the frontline," and the Azerbaijani Defence Ministry accused Armenian forces of targeting several Azerbaijani regions. Armenian military officials reported "intense fighting" in the conflict zone throughout the day and "heavy battles" Sunday evening.

The four weeks of fighting have prompted concerns of a wider conflict involving Turkey, which has thrown its weight behind Azerbaijan, and Russia, which has a security pact with Armenia.

It also worried worried Iran, which has borders with both Armenia and Azerbaijan. Iran has occasionally complained about stray mortar rounds and rockets that injured people and damaged buildings in rural areas near the borders.

Iran's Revolutionary Guard said Sunday it deployed units of its ground forces to the border near the area of the conflict, the country's state radio reported. Gen. Mohammad Pakpour, chief of the Guard's ground forces, said that Iran would not accept any action that "violates" the security and peace of Iranian people in the region.

Both Armenia and Azerbaijan maintained they were committed to a peaceful resolution and blamed each other for hindering peace.

Azerbaijani President Ilham Aliyev has said Armenian forces must withdraw from Nagorno-Karabakh to end the fighting. "A ceasefire cannot be without conditions. The truce is possible only after Armenian leadership announces withdrawing its troops from Azerbaijan's occupied territories," Aliyev said Sunday.

Armenian Prime Minister Nikol Pashinian, in turn, accused Azerbaijan of taking a "non-constructive" stance in negotiations. "To solve this issue, we need mutual concessions. Every time Armenia expresses willingness to make any concessions ... Azerbaijan comes up with new demands, new conditions," Pashinian said Sunday in an interview.

The announcement of the new ceasefire came several hours after those remarks.

U.S. President Donald Trump's national security adviser, Robert O'Brien, tweeted Sunday that the president asked him to meet at the White House with the Armenian and Azerbaijani foreign ministers on Friday and that he spoke on the phone Saturday with Pashinian and Aliyev.

"Congratulations to all of them for agreeing to adhere to the cease-fire today," O'Brien said, adding that Pompeo and his deputy Stephen Biegun played key roles. "Lives will be saved in both nations."

------

Associated Press writers Daria Litvinova in Moscow, Aida Sultanova in London, Nasser Karimi in Tehran, Iran, and Deb Riechmann in Washington contributed to this report.