* Santos wins with clear margin
* Election seen as referendum on peace talks (Adds Santos camp's celebrations, detail and color)
By Peter Murphy and Helen Murphy
BOGOTA, June 15 Colombian President Juan Manuel Santos won a second term on Sunday with an election victory that allows him to continue peace talks with Marxist guerrillas to end a half-century war.
Santos beat right-wing challenger Oscar Ivan Zuluaga with about 50.9 percent support after a bitter campaign that challenged voters to decide between the incumbent's pursuit of negotiated peace or a likely escalation of combat under his rival.
Zuluaga won about 45 percent support. Votes had been counted from more than 99 percent of polling stations, meaning Santos' victory was secure.
At his campaign headquarters in Bogota, supporters danced and waved flags as music blared and confetti rained down. Raising their hands daubed with the words "peace", followers waited for Santos to take to the stage to proclaim victory.
In an old industrial part of the city, close to Bogota's colonial center, some of Zuluaga's deflated backers sobbed as they watched the final numbers roll in.
Santos' re-election comes as a relief to his backers as well as traditional rivals from the left who backed the peace talks and feared they could have been jettisoned by Zuluaga in favor of trying to end the long conflict on the battlefield.
Santos, a center-rightist who hails from one of the country's most influential families, opened talks with rebel leaders of the Revolutionary Armed Forces of Colombia (FARC) in late 2012, aiming to end a conflict that has killed over 200,000 people and forced millions more from their homes.
He made hopes of peace his key selling point throughout the campaign.
"I voted for peace, Santos is a decent man who has shown another way of doing politics," said Wilmar Diaz, a 35-year-old public relations executive.
Although they have shown more progress than previous failed efforts, the peace talks in Cuba have been divisive. Zuluaga supporters fear a peace deal could hand FARC leaders political power without punishment for their crimes.
Santos sought to capitalize on support for the negotiations by revealing in the last days of the campaign that preliminary talks had begun with the country's second biggest rebel group, the National Liberation Army (ELN).
A victory for Zuluaga, 55, could have spelled the end of the peace process if the FARC rejected the tougher conditions he vowed to impose to keep talks going.
Colombia's financial market were not rattled by the campaign because both candidates are considered business friendly. The economy is one of the fastest growing in Latin America.
Santos' push for peace angered popular former president Alvaro Uribe, who argued for a continuation of the successful U.S.-backed military onslaught that characterized his 2002-2010 rule.
Zuluaga was the candidate of Uribe's party and the former president had such a prominent role in the campaign that some voters spoke of "voting for Uribe".
After insisting peace can be achieved, Santos will now be under pressure to complete the five-point agenda - already more than half complete - and keep the FARC committed to the process.
Santos won the 2010 election with 69 percent of the vote and his weakened mandate reflects concerns that rebels will be reluctant to disarm or abandon a lucrative illegal drugs trade even if they sign peace.
Congressional elections in March also weakened Santos' majority in the legislature which will be tasked with passing any proposed legal changes under a peace deal. (Reporting by Julia Symmes Cobb; Editing by Helen Murphy and Kieran Murray)