Luis Alberto Lacalle is hoping for a return to the presidential palace
Former guerrilla leader Jose Mujica has fallen just short of the majority needed to triumph in the first round of Uruguay's presidential election.
Senator Mujica, from the governing Broad Front coalition, took 47.49% in Sunday's poll.
The result means he will face former president Luis Alberto Lacalle, who won 28.53%, in the run-off on 29 November.
The winner will replace outgoing socialist President Tabare Vazquez and take office in March next year.
With all the votes counted, Sen Mujica, as expected, finished out in front, but just shy of the votes needed to avoid a second round.
Opinion polls have suggested Sen Mujica will win a run-off but analysts say Mr Lacalle may be able to win over a significant number of supporters of the third-placed candidate, Pedro Bordaberry, who finished on 16.66%.
Sen Mujica was a member of the rebel Tupamaros movement in the 1960s and 1970s.
Mr Lacalle, famed for having survived an attempt to poison him - and other National Party leaders - with tainted wine in the 1970s, is a 68-year-old lawyer.
Jose Mujica has a reputation for speaking his mind
He has pledged to remove the income tax imposed by President Vazquez and trim the size of government in the country of 3.4 million.
During the election campaign, he sought to capitalise on concerns among some voters about his rival's militant past.
As well as presidential and congressional elections, two referendums were held.
One asked whether a law which gives immunity to former security officials accused of human rights abuses during Uruguay's period of military rule should be revoked; the other raised the issue of allowing postal votes from expatriate Uruguayans.
Both initiatives were defeated.