Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Colombians rejected a peace deal with leftist rebels by a razor-thin margin in a national referendum Sunday, scuttling years of painstaking negotiations and delivering a major setback to President Juan Manuel Santos, who vowed to keep a cease-fire in place and forge ahead with his efforts to end a half-century of war.

With more than 99 percent of polling stations reporting, 50.2 percent of ballots opposed the accord with the Revolutionary Armed Forces of Colombia, or FARC, while 49.8 percent favored it — a difference of fewer than 57,000 votes out of a total of 13 million.

Pre-election polls had predicted that the "yes" vote would win by an almost 2-to-1 ratio.

To save the accord, Santos ordered his negotiators to return to Cuba on Monday to consult with FARC leaders who watched the results come in from the communist island. He also promised to listen to opponents in a bid to strengthen the deal, which he said is Colombia's best chance for ending a conflict that has killed 220,000 people and driven almost 8 million people from their homes.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"I've always believed in a wise Chinese proverb — to look for opportunities in any situation. And here we have an opportunity that's opening up, with the new political reality that has demonstrated itself in the referendum," he said before descending to the steps of the presidential palace to address a small group of supporters waving white flags symbolizing peace.

Photos: Colombia's Rebels Sign Historic Agreement Ending 50-Year War

The shock outcome, comparable to Britain's decision to leave the European Union in the Brexit vote, opens an uncertain outlook for the peace accord, which was signed less than a week ago by Santos and FARC in a ceremony attended by heads of state, U.N. Secretary-General Ban Ki-moon and U.S. Secretary of State John Kerry.

Supporters of the peace accord between the Colombian government and rebels of the Revolutionary Armed Forces of Colombia, or FARC, react Sunday as results of a referendum indicate the agreement was defeated. Ariana Cubillos / AP

Opposition to the accord, led by influential former President Alvaro Uribe, argued that the government was appeasing FARC and setting a bad example that criminal gangs would seize on by sparing rebels jail time if they confessed their crimes and guaranteeing the group 10 seats in congress through 2026.

If the "no" vote prevailed, Uribe said, the government should return to the negotiating table. But that is an option that Santos has previously ruled out.

With the government's ability to govern now in question, all eyes have turned to Uribe, who remains the country's most popular politician and whose almost-decade-long military offensive forced FARC to the negotiating table.

He made no immediate comment on the results, but his former vice president, Francisco Santos, the current president's cousin, rejected claims that Uribe supporters oppose peace.

"What we want is an agreement for all Colombians," he said.

The FARC leader known as Timochenko told reporters in Havana, Cuba, that the rebel group's commitment to peace remains intact.

"The FARC deeply regret that the destructive power of those who sow hatred and revenge have influenced the Colombian people's opinion," he said. "The FARC reiterates its desire for peace and our willingness to use only words as a weapon for building the future."