Sri Lankan officials and Tamil rebels have agreed to curb violence and renew talks in April on their fragile truce, following a two-day meeting in Geneva.
Both sides have been talking tough and sticking to positions
Norwegian mediator Erik Solheim said the outcome was "above expectations" and had raised confidence levels.
The joint statement released was short, with sources saying it followed difficulty in agreeing wording.
The talks follow a recent upsurge in violence in Sri Lanka's north and east which has cost at least 120 lives.
The new talks will also be in Geneva, on 19 and 21 April.
The joint statement read: "Both sides committed to respecting and upholding the ceasefire agreement and are committed to taking all necessary means to ensure that there will be no intimidation and acts of violence."
The BBC's Ethirajan Anbarasan in Geneva says both sides have made important promises in the statement.
The continuation of the talks is itself a mark of both sides' flexibility, he adds, as it recently looked as though the talks may not progress at all.
The face-to-face meeting at a secluded venue outside Geneva was the first in nearly three years.
The Sri Lankan government said at the outset that while the four-year-old truce had brought benefits, it was "prejudicial to the sovereignty and the territorial integrity" of the country.
It wants to widen the truce, making it a first step to a settlement.
'Open and flexible'
The rebels feel the threat to the ceasefire comes from armed paramilitary groups who they allege are supported by the government.
Foreign donors had urged both sides to be "open and flexible" in discussions.
Much of the $4.5bn pledged by donors to help rebuild Sri Lanka is linked to progress in the peace process and remains on hold.
Violence in Sri Lanka has continued during the talks.
Sri Lankan civilians have been caught up in the violence
On Thursday, the army accused the rebels of killing a Muslim man near Batticaloa in the east. The rebels denied the allegations.
Troops, in turn, denied Tamil Tiger claims they had shelled rebel positions.
On Wednesday, the rebels said six men in military uniforms had attacked one of their posts in Batticaloa, killing one of their members. The army said it had no knowledge of the incident.
At least 120 people have died in the recent upsurge of violence, which began soon after Mahinda Rajapakse assumed the presidency in November.
Attacks on the military have been blamed on the rebels, who deny involvement.
Tamil Tiger supporters say more than 40 Tamils have been killed by the security forces in a series of attacks since the start of December. Others blame some of those deaths on the rebels or other armed groups.
More than 60,000 people died during two decades of conflict in Sri Lanka. The Tamil Tigers want autonomy for minority Tamils in the north and east. President Rajapakse has said the solution to the conflict lies in a unitary state.