Indonesia kicks off closely-fought general elections

Indonesia heads to the polls to elect new president

Voting for a new president has begun in Indonesia, the world's third most populous democracy, and the outcome looks a lot less certain that it did a few weeks ago.

Joko "Jokowi" Widodo, the popular governor of Jarkata, had been the frontrunner to win Wednesday's vote but his poll lead narrowed sharply in recent weeks against former special forces general Prabowo Subianto; they're now running neck-and-neck in opinion polls.

Indonesia votes: Five things you need to know

Prabowo, a nationalist and former son-in-law of long-ruling dictator Suharto, has overcome allegations of past human rights abuses for which he has been denied a U.S. visa and restyled himself. Still, analysts say Prabowo has run an aggressive negative campaign and the prospect that he could win has unnerved foreign investors.

"It looks increasingly like Jokowi's not going to win," Mark Matthews, head of research for Asia at Bank Julius Baer told CNBC, adding that the bank has turned 'underweight' on Indonesian stocks in response to political developments.

Indonesian frontrunner presidential candidate Joko Widodo addresses supporters during a campaign rally in Jakarta.
Romeo Gacad | AFP| Getty Images

"A margin that was 25 basis points over his rival has gone down all the way to three basis points and about a third of poll respondents say that they are undecided, so this election could go either way," he said.

The Indonesian rupiah finished higher against the U.S. dollar on Tuesday at 11,620 after hitting a four-month low late last month. Meanwhile, Jakarta's benchmark stock index rose 0.7 percent to 5,024, closing in on the one-year high hit in May – partly amid hopes of an election win for the pro-business Jokowi. Markets are closed Wednesday for the polls.

Read MoreIndonesia election no done deal for favorite

Tim Lindsey, a professor of Asian Law at the University of Melbourne, told CNBC last week that it's hard to judge how Washington would respond to a Prabowo win.

"He's got a shocking human rights record that's led to him being denied visas for entry into the U.S. and U.K.," he said. "He'll be a very difficult leader for any country, including the U.S., to deal with, because there's a gap between what he says and what he actually does."

Prabowo, Jokowi locked in tight race: Professor

Matthews at Bank Julius Baer added: "Prabowo is an unknown; at a recent rally he used very anti-foreign language and even if that's rhetoric to get elected the mere fact that he's using it is not helpful to markets."

Analysts say this election is key because the next president will lead Southeast Asia's biggest economy for the next five years and comes at a time when economic growth has fallen to its lowest level in over four years.

Read MoreIndonesia has no room for economic nationalism: Fin Min

They add that while Jokowi has become more nationalistic during the election campaign, he is generally viewed as pro-business and investment. He's also committed to scale back fuel subsidies that would help tackle a wide current account deficit.

"Indonesia spends money every year basically burning fossil fuels, and a large part of it goes to a middle class who can afford the market price anyway," OCBC Bank Economist Wellian Wiranto said.

"Jokowi's talked more concretely about pushing back fuel subsidies over the course of the 4-5 years he might be in office and that would give the government the kind of money that it needs to build on infrastructure- power plants, sea ports, airports, you name it," he added.