The closest-ever election in Cyprus has ended President Tassos Papadopoulos's five years in power.
Mr Papadopoulos was narrowly defeated in the knife-edge poll
The MEP Ioannis Kasoulides won the knife-edge poll by just 980 votes, after a turnout of around 90%.
The former foreign minister will face Demetris Christofias, who came second, in a run-off vote next Sunday.
The election is being seen as a crucial step towards reunification with the break-away Turkish-controlled northern Cyprus after decades of division.
Mr Kasoulides won 33.51% of votes compared to 33.29% for Mr Christofias and 31.79% for Mr Papadopoulos.
A member of the right-wing DISY party, Mr Kasoulides is the candidate most favoured by the international community to push ahead with reunification talks, says the BBC's Tabitha Morgan in Nicosia.
She says the result shows that most Cypriots have clearly rejected Mr Papadopoulos's uncompromising approach to solving the Cyprus problem in favour of a more open-minded candidate.
Ahead of Sunday's vote, both Mr Kasoulides and Mr Christofias, the communist party leader, had claimed to be best qualified to head negotiations with the Turkish north.
Last month the International Crisis Group, a think tank, warned that if talks after the election failed, the likely outcome would be partition.
Cypriots living in Greece and Britain have been flown back to Cyprus on planes chartered by the main parties, so that they can vote.
Cyprus was partitioned after a Turkish invasion in 1974, which came shortly after a Greek Cypriot coup backed by the military junta ruling Greece at the time.
Shortly before joining the European Union in 2004 the Greek Cypriots rejected a United Nations plan to reunify the island.
Turkey recognises only the Turkish Cypriot authorities and keeps about 30,000 troops in the north of the island.