(Corrects paragraph 2 to show "no" vote marginally ahead)
By Helen Murphy and Julia Symmes Cobb
BOGOTA, Oct 2 (Reuters) - Colombia's referendum over a peace accord with Marxist rebels went down to the wire on Sunday, jeopardising a deal that would end 52 years of war and allow FARC fighters to re-enter society and form a political party.
With results in from 90.66 percent of voting stations, the "no" vote was marginally ahead at 50.10 percent, versus 49.89 percent for "yes," according to Colombia's election authority.
That confounded opinion polls that had predicted a comfortable victory for the "yes" camp promoted by President Juan Manuel Santos. He has said his government will go back to war if the deal is rejected.
The vote asked for a simple "yes" or "no" on whether Colombians support the accord signed last Monday by Santos, who has staked his legacy on peace, and the rebel commander known as Timochenko.
"We must end a 52-year war and open the way to peace, a peace that will take us to a better future ... peace is the way to ensure our children and grandchildren have a better country," Santos said after voting.
The Revolutionary Armed Forces of Colombia, known as FARC, whose numbers were halved to about 7,000 in recent years because of a U.S.-backed military offensive, has agreed to turn in weapons and fight for power at the ballot box instead of with bullets.
After four years of negotiations in Havana, the final agreement was applauded around the world. Recent opinion polls show about two-thirds of voters are likely to ratify it.
Influential former President Alvaro Uribe led the "no" camp, arguing that rebels should pay for crimes in jail and never be given congressional seats. But most Colombians, including some who see the accord as too soft on the FARC, seem convinced an imperfect peace is better than more war.
"This country needs a change and it has to be today," Fabiel Cruz, 31, an administrator, said after voting yes. "It's the only chance we have. If it's not today it will be never."
Under the accord, the FARC, which began as a peasant revolt in 1964, can compete in the 2018 presidential and legislative elections and will have 10 unelected congressional seats guaranteed through 2026.
It will give up its role in the lucrative illegal drug trade and take part in reforming rural Colombia, most of which is poor and undeveloped.
Details of the FARC's political platform have not yet been revealed but its Marxist rhetoric goes very much against the beliefs of the largely conservative Colombian population, and most, including Santos, think it will have difficulty finding a political footing.
Colombia's Senate has 102 members and the House of Representatives has 166, so the FARC's 10 seats are not enough to sway legislation. But some Colombians are still outraged.
"I voted no. I don't want to teach my children that everything can be forgiven," said Alejandro Jaramillo, 35, angered that the rebels will not serve jail time.
"The accord gives a lot of concessions to the guerrillas. They changed their strategy from arms to politics but the goal is still socialism," said Javier Milanes, 34, a restaurant owner who also voted no.
For decades, the FARC bankrolled the longest-running conflict in the Americas through the illegal drug trade, kidnapping and extortion, spreading a sense of terror that left few Colombians unaffected. The conflict took more than 220,000 lives and displaced millions of people.
Colombians are tired of the bloodshed, which at its worst saw the FARC positioned close to the capital and the state on the verge of collapse. Battles between the guerrillas, paramilitaries, drug gangs and the army raged in the countryside and there were atrocities committed on all sides.
A major concern for Colombians is that the FARC amassed a fortune from the cocaine trade. If the group does not hand over all its assets to victim reparations as promised, it could have a political war chest that arguably puts it at an advantage over other political movements.
If the peace accord is approved on Sunday, Santos likely will turn his focus toward a much-needed tax reform and other measures to compensate for a drop in oil income, as well as possible talks with the smaller ELN rebel group. (Reporting by Helen Murphy and Julia Symmes Cobb, Additional reporting by Carlos Vargas and Monica Garcia; Editing by Bill Trott and Peter Cooney)