ASTANA, Kazakhstan -- The Syrian government and some of the largest rebel factions fighting against it reached an agreement Tuesday on a statement reaffirming the tenuous ceasefire in the country, and on a mechanism that will oversee its implementation.

The warring factions’ two days of intense talks in the Kazakh capital were set to culminate with the agreement -- which is still being finalized -- that also calls for another round of talks in Geneva next month. There is hope the talks will pave the way to a political solution to the Syrian war that has dragged on for six years, claiming more than 300,000 lives.

An official communique issued by the three nations acting as guarantors for Syria and the rebels -- Russia and Iran for the Syrian government and Turkey on behalf of the opposition -- states that they will “seek, through concrete steps and using their influence over the parties, consolidation of the ceasefire” that has largely held for almost a month, and “establish a trilateral mechanism to observe and ensure full compliance with the ceasefire.”

Get Breaking News Delivered to Your Inbox

Bashar Ja’afari, Syria’s U.N. ambassador who is leading the government delegation, told reporters after the deal was announced that Damascus deemed it a “success.”

“Finally we have a consensual paper agreed upon by everybody,” he said.

The other key agreement from Astana was that Syria and the rebel factions are to sit down again on Feb. 8, in Geneva, to continue the dialogue aimed at achieving a broader peace deal, under the auspices of United Nations Security Council resolutions already adopted.

For the first time in six years, Syrian government representatives sat at the same table Monday with the military commanders of major rebel factions -- rather than the Syrian political opposition -- in a bid to consolidate the fragile ceasefire.

The meeting was closed to the media after an address by Kazakh Foreign Minister Kairat Abdrakhmanov, who said it was time to “make the real breakthrough that Syrian people rightfully deserve.”

The opposition’s stinging defeat in Aleppo in December robbed them of their last major urban stronghold to challenge Assad’s rule.

The future of President Assad himself -- one of the main sticking points in all previous talks, with Western-backed opposition groups insisting he play no role in any political transition -- was not on the agenda at all in Astana.

The negotiations got off to a rocky start. After just an hour with with both delegations seated at opposite ends of a large conference table in the Rixos President Hotel in Astana on Monday, the rebels said they would no longer negotiate face-to-face with the government representatives.

Following a tense session mediated by U.N. envoy Staffan de Mistura, the senior Syrian government envoy denounced a speech given by the head of the opposition factions as “provocative” and “insolent.”

The speech was “meant to provoke the attendees,” Ja’afari said Monday.

Mohammed Alloush, a leader of the powerful Jaysh al-Islam rebel group who heads the opposition delegation, insisted he wanted to stop “the horrific flow of blood” in the six-year war. “To achieve that, the Syrian army and its Iran-backed allies have to abide by the truce and Shiite militias have to leave the country,” he said.

The opposition delegation is comprised of about a dozen senior rebel figures. Most major rebel groups, after weeks of denials and indecision, decided to send representatives. Some of them were under intense pressure from Turkey, which controls their vital supply lines across its border and which, after years of staunch opposition to the Russian stance in the war, has recently seen relations with Moscow thaw.

Turkey and Russia have backed opposing sides in Syria’s war since it began in 2011, but in recent weeks the two nations have worked closely together to arrange the Astana talks and cajole the respective sides to take part.

The Astana talks, which Assad’s allies in Iran also helped organize, were the first test of this once unlikely partnership in redrawing Syria’s geo-political map.

Just getting both sides to the negotiating table was a small victory. Previous talks in Geneva that were brokered by the United Nations included political opposition figures who were dismissed by Syrian government officials as not having significant influence on the battlefield.

A ceasefire that went into effect on December 30 has largely held, in spite of lingering pockets of violence, particularly in the suburbs of the capital Damascus where Syrian government forces have been advancing to retake strategic areas.

The truce excludes extremist groups such as the Islamic State of Iraq and Syria (ISIS) and groups linked to al Qaeda in Syria.

The United States is playing no role in Astana, although Kazakhstan, with the backing of Moscow and Ankara, extended an invitation to the new U.S. administration last week.

U.S. Ambassador to Kazakhstan George Krol was present, while several other Western envoys for Syria were also in Astana to observe developments.