Voters in Colombia have rejected a landmark peace deal with Farc rebels in a shock referendum result, with 50.24% 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.
He said the current ceasefire remained in place and that he had ordered negotiators to travel to Cuba to consult Farc leaders on the next move.
“I won’t give up,” he said. “I’ll 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.”
Meanwhile the Farc leader, known as Timochenko, said the group remained committed to securing an end to the war.
He also criticised the No campaign.
“The Farc deeply regret that the destructive power of those who sow hatred and revenge have influenced the Colombian people’s opinion,” he told reporters.
The rebels earlier agreed to lay down their weapons after 52 years of conflict to join the political process.
But critics said the deal treated the Farc, which the US still considers a terrorist group, too leniently.
The deal would have allowed rebel leaders to avoid a prison sentence if they confessed their crimes. The rebels were also promised 10 seats in congress for the next two elections.
The agreement was rejected with 50.2% of voters against it and 49.8% in favour – a difference of less than 63,000 votes out of 13 million ballots.
The surprise result means the peace process is now shrouded by uncertainty.
Former President Alvaro Uribe, who headed the “no” campaign, said all Colombians wanted peace, but that the deal needed “corrections”.
“We want to contribute to a national accord and be heard,” he said.
This was arguably the most important vote in Colombia’s history and the government had hoped that the promise of peace would have persuaded a majority of voters to accept the agreement.
But with fears that too many concessions have been made to the guerrillas, by less than half of 1%, the people of Colombia rejected the agreement (although voter turnout, at only 40%, was remarkably low).
Speaking on national television shortly after the result was announced, President Santos said that a previously announced ceasefire will hold and that both sides would meet in the Cuban capital, Havana, to decide on a way forward.
While there’s clearly a will across Colombia to end more than half a century of violence, the terms of the deal still worry many Colombians.
President Santos had previously warned that there was no plan B for ending the war, which has killed 260,000 people.
The result of the vote is a major setback to the president, who since his election in 2010 had pledged to end a conflict blamed for displacing about eight million people.
Less than a week ago, he was celebrating with world leaders and Farc commanders the end of Latin America’s last and longest-running armed conflict at a ceremony in the historic city of Cartagena.
The rebels were making plans to lay down their weapons and become a political party within six months.
But the president is now facing one of the most difficult moments in Colombia’s recent history, says the BBC’s Americas Editor Leonardo Rocha.
The 297-page peace deal is a deeply divisive issue in Colombia, and the government has been accused of taking victory for granted.
The referendum campaign spent heavily on television adverts in addition to staging concerts and peace rallies throughout the country in a bid to get people out to vote.
It called on the support of U2’s Bono and former Beatle Ringo Starr – and for the first time in an election made ballots available in Braille so blind Colombians could vote.