Macedonia shares its name with a region in northern Greece. But Athens refuse to recognise the name and says Macedonia's use of the name implies a claim on Greek territory.
The candidates have offered opposing views on whether Macedonia should change its name, or risk being blocked from the EU and Nato.
Ivanov said that if elected, he would focus on solving the long-running dispute with Greece.
"Our first priority is to solve the name issue... This is our condition to enter European integration," Ivanov said after casting his ballot.
Macedonia is yet to start EU accession talks, four years after becoming an official candidate to join the bloc.
The election on Sunday was held amid tight security in an effort to prevent a repeat of violence that marred a parliamentary vote in 2008.
"So far there is no information about any incident or any problem in the electoral process... on all the territory" of Macedonia, Ivan Kotevski, an interior ministry spokesman, said.
Macedonia came close to war during a 2001 conflict between security forces and ethnic Albanian fighters that ended with a peace accord giving the minority more rights and control over local affairs.