Votes are being counted in Indonesia's first direct presidential election.
Yudhoyono has been tipped as the leading candidate
Millions turned out to elect a new leader, from Papuan highlands and Javan paddy fields to strife-ridden Aceh.
"I want to use my right to pick the president because this is important for all of us," said housewife Endah Sari, from the Papuan capital Jayapura.
Opinion polls before the vote showed former Gen Susilo Bambang Yudhoyono as the clear front-runner, but he was not expected to win the poll outright.
Early indications are that no candidate will get more than 50% of the vote. If that is the case, there will be a run-off election between the two top candidates in September.
"God willing, I am confident I can go into the second round," said Mr Yudhoyono, a former security minister.
The BBC's Rachel Harvey in Jakarta says President Megawati Sukarnoputri is struggling to stay in the contest, with a tight battle for second place.
The outcome of the election will be announced within 10 days, according to Indonesia's election commission.
Indonesia's first ever presidential election is a massive enterprise, with more than 150 million eligible voters spread across 14,000 islands and three time zones.
Half a million polling stations were set up across the country - some little more than bamboo shacks.
Vote-counting slowed down when the national election chief ordered a nationwide recount to include millions of ballot papers which had inadvertently become invalid.
Voters used a nail to punch a box corresponding to their choice. But because ballot papers were folded in half, many people punched two holes.
Our correspondent said this did not appear to be a serious problem, though in a tight race any hiccup in the process could cause the final result to be questioned.
The atmosphere surrounding the poll remained calm, with none of the protests, violence or stock market jitters that some analysts had feared.
"This is a wonderful transition from authoritarian rule to purely democratic rule," said former US President Jimmy Carter, one of 500 international election observers.
"It doesn't really matter who wins, because the true winner will be democracy," said Eci Widiwati, as she queued to vote on the tourist island of Bali.
"I feel the weight of responsibility on my shoulders," another voter told the BBC's correspondent Rachel Harvey in Jakarta.
Turnout was reported to be high, but some polling stations got off to a slow start as many people were sleeping late after staying up overnight to watch the Euro 2004 football final.
Battle for second place
With Mr Yudhoyono well ahead in the opinion polls, President Megawati is battling for second place with another ex-military figure, Gen Wiranto.
Until March, Mr Yudhoyono was security minister in Mrs Megawati's government. Now Mrs Megawati has been left trailing in his wake.
Susilo Bambang Yudhoyono
She came to power in 2001 promising reform, but many Indonesians have been left disappointed. Little has been done to curb corruption, unemployment and separatist violence.
The other leading contender, Gen Wiranto, is backed by the massive Golkar Party, which won parliamentary elections in April.
Gen Wiranto's campaign may have suffered from human rights allegations levelled against him over his role in Indonesia's former province of East Timor.
National assembly speaker Amien Rais has run a surprisingly effective campaign, positioning himself as the only true reformer of the five presidential contenders, but opinion polls still show him as coming in fourth position.
The fifth candidate, Vice-President Hamzah Haz, has polled almost no support, reports say.