Image copyright Reuters Image caption The race between Prabowo Subianto (L) and Joko Widodo (R) is seen as too close to call

Both candidates in the Indonesia presidential election have claimed victory based on unofficial results.

Jakarta governor Joko Widodo told a news conference shortly after polls closed that "at the time being" early vote counts showed he was the winner.

An hour later, former army general Prabowo Subianto said estimates showed he had "received the support and mandate from the people of Indonesia".

The official tally is expected to be announced on 21-22 July.

Ahead of final results, so-called "quick counts" by pollsters - which have been reliable in the past - are being released from some 2,000 representative polling stations around the country.

Reuters reported five vote tallying agencis had Mr Widodo in the lead. One count by Indonesia's oldest think tank CSIS Indonesia put him ahead with 52% of the vote, compared with Mr Subianto's 48%.

Another by news website Kompas.com had a similar result, while a third by Saiful Mujani put Mr Widodo on 52.76% and Mr Subianto on 47.24%.

But Reuters reported that two other vote tallying agencies had put Mr Subianto ahead by one to two percentage points.

Karishma Vaswani, BBC News, Jakarta

This is the most divisive election Indonesia has ever seen and supporters from both camps think their man should be in charge.

On national television, furniture-maker-turned-politician Joko Widodo was the first to announce his team had won. Next came Prabowo Subianto, an ex-military general, telling supporters that he is president-elect.

With both sides already celebrating victory, Indonesia faces uncertainty before official results in two weeks - until then the country remains in limbo whiles votes are counted.

Indonesians have been eagerly anticipating the results - now all that's certain is that the suspense and confusion will continue.

'Respect the choice'

Voting opened at 07:00 local time and closed at 13:00 local time.

Indonesia has three times zones and the last ballots were cast just before 06:00GMT.

Outgoing President Susilo Bambang Yudhoyono could not stand for another term as the constitution has a two-term limit. After casting his ballot, he urged all parties to respect the poll result.

Image copyright AP Image caption Voting began first in eastern parts of Indonesia, which has three time zones

Indonesia elections 190million eligible voters 30% will be first-time voters at

479,183 polling stations on

8,000 inhabited islands across Indonesia and overseas AP

Media playback is unsupported on your device Media caption Indonesia's election has been a tight race

"Our democracy is at a relatively mature state, and our people enjoy the freedom to choose," the outgoing leader said.

"Therefore, I hereby urge all the leaders and political elites in this country to respect the rights of the people, respect the freedom of the people to choose their leader."

Mr Widodo, from the Indonesian Democratic Party of Struggle (PDI-P), is a popular figure with the public.

He is supported by young people in both urban and rural areas who see him as a clean politician in a country beset by corruption.

But critics say he lacks experience in national politics and international relations.

He is supported by Indonesia's most popular Islamic Party, the National Awakening Party (PKB), and the National Democrat Party (NasDem).

Mr Subianto, from the Great Indonesia Movement Party (Gerindra), is seen as a convincing campaigner and a decisive man with good knowledge of defence, because of his military background.

He has, however, been dogged by allegations of human rights abuses committed during former dictator Suharto's regime, which ended in 1998.

In the final days of Suharto's rule, the unit which he commanded is accused of kidnapping, torturing and killing activists protesting against Suharto.

Mr Subianto is supported by Golkar, which is Indonesia's second largest party. He is also endorsed by the Democratic Party (Demokrat) of current leader Susilo Bambang Yudhoyono.

Both campaigns have used nationalistic rhetoric on the economy, corruption and other domestic issues such as infrastructure and social security, but they have been less vocal on detailed policies on job creation and boosting economic growth.

Image copyright Getty Images Image caption The poll, taking place across hundreds of islands, is a major logistical challenge

Image copyright AFP Image caption Ballot boxes have been ferried to remote islands in speedboats and sent by helicopters to far-flung hamlets

Ahead of the vote, election officials delivered ballot boxes to polling stations around the country, ferrying them to Indonesia's numerous islands by speedboat, carrying them on horseback along mountain paths, and dropping them off at remote hamlets with helicopters and small planes.

Meanwhile in Jakarta the authorities deployed 22,300 policemen to keep the peace, reports say.