Voters in Colombia have rejected a landmark peace deal with Farc rebels in a shock referendum result, with 50.2% voting against it.
The deal was signed last week by President Juan Manuel Santos and Farc leader Timoleon Jimenez after nearly four years of negotiations.
But it needed to be ratified by Colombians in order to come into force.
Addressing the nation, President Santos said he accepted the result but would continue working to achieve peace.
How did it happen?
Colombians were asked to endorse or reject the peace agreement in a popular vote on Sunday.
The "yes" campaign had the backing not just of President Santos but of a wide array of politicians both in Colombia and abroad, including UN Secretary General Ban Ki-moon.
But there was also a vocal campaign for a "no" vote, led by former Colombian President Alvaro Uribe.
Polls conducted ahead of Sunday's vote suggested a comfortable win for the "yes" campaign.
But in a surprise result, 50.2% of voters rejected the agreement compared with 49.8% who voted for it.
The difference with 98.98% of the votes counted was less than 54,000 votes out of almost 13 million ballots.
Turnout was low with fewer than 38% of voters casting their votes.
Who voted how?
Colombia was divided regionally with most of the outlying provinces voting in favour of the agreement and those nearer the capital and inland voting against it.
In Choco, one of the provinces hardest hit by the conflict, 80% of voters backed the deal.
In the town of Bojaya, where at least 119 people were killed when a church was hit by Farc mortar bombs, 96% of residents voted "yes".
Colombia's capital, Bogota, also voted "yes" with 56%.
The province of Vaupes, in the east of the country, also registered strong support for the deal, with 78% voting in favour.
Vaupes has also seen its share of conflict, including the attack on the town of Mitu, which the rebels seized control of in 1998 after taking a large number of police officers hostage. Some of the officers were held hostage by the Farc for 12 years before being freed by the army in 2010.
In the eastern province of Casanare on the other hand, 71.1 % voted against the deal.
It is an area where farmers and landowners have for years been extorted by the Farc and other illegal groups.
In Antioquia, the home state of ex-President Uribe, 62% rejected the deal.
Why did people vote 'no'?
Under the agreement, special courts would have been created to try crimes committed during the conflict.
Those who confessed to their crimes would have been given more lenient sentences and would have avoided serving any time in conventional prisons.
This, for many Colombians, was one step too far.
They also balked at the government's plan to pay demobilised Farc rebels a monthly stipend and to offer those wanting to start a business financial help.
"No" voters said this amounted to a reward for criminal behaviour while honest citizens were left to struggle financially.
Many also said that they simply did not trust the rebels to keep their promise to lay down arms for good.
They pointed to previous failed peace negotiations when the rebels took advantage of a lull in fighting to regroup and rearm as evidence that the Farc had broken their word before.
Others were unhappy that under the agreement, the Farc would be guaranteed 10 seats in the Colombian Congress in the 2018 and 2022 elections.
They said this would give the newly created party an unfair advantage.
What will happen next?
President Santos said that the bilateral ceasefire between government forces and the Farc would remain in place.
He has told government negotiators to travel to to Cuba to consult Farc leaders on the next move.
President Santos has promised to "continue the search for peace until the last moment of my mandate because that's the way to leave a better country to our children".
"I won't give up," he said.
The Farc leader known as Timochenko also said that the rebels remained committed to securing an end to the conflict.
"The Farc reiterates its disposition to use only words as a weapon to build toward the future," he said after the result.
"Count on us, peace will triumph."
But before the vote, President Santos had told the BBC that there was "no Plan B" for ending the conflict, which has killed an estimated 260,000 people.
He said he would meet all political parties on Monday to discuss the next steps and "open space for dialogue".
What does the 'no' campaign want?
The main proponent of the vote against the agreement was former President Alvaro Uribe.
Following the "no" vote, Mr Uribe insisted that he was not opposed to peace but that he wanted to renegotiate some of the agreement, which he said needed "corrections".
Among the "corrections" he has demanded are, among others:
- That those found guilty of crimes be barred from running for public office
- That Farc leaders serve time in prison for crimes committed
- That the Farc use their illicit gains to pay their victims compensation
- That no changes be made to the Colombian constitution
He said he wanted "political pluralism which can't be perceived as a reward for crimes committed, social justice without risk to honest enterprise".
"We want to contribute to a national accord and be heard," he said.
However, it is not clear whether the Farc would agree to the "corrections" Mr Uribe wants or if they would even consider renegotiating the deal which took four years of formal negotiations and two years of secret talks to reach.
What has been the reaction?
One of surprise, as even Mr Uribe, the main backer of the "no" vote, had predicted that the "yes" vote would win.
Some of those who had gathered to watch the result on giant screens expressed their disappointment.
One woman in Medellin told Caracol radio: "I never thought I could be this sad. I haven't got any victims in my family, nor any siblings who've joined the guerrilla, but I think of my country, of the young people and my heart breaks into a thousand pieces."
Farc leader Timochenko expressed his disappointment with the result which he blamed on "the destructive power of those who sow hatred and revenge" and "have influenced the Colombian people's opinion".
Opponents of the agreement, however, took to the streets to celebrate their unexpected win.
Many said that "justice has won" and expressed their relief at the result.
One Colombian woman told BBC Mundo that Colombians had not forgotten that the path of the Farc was "paved with kidnappings, killings and drug trafficking".