Indonesia's Joko Widodo has taken over as president of the world's third-largest democracy, completing a remarkable journey from riverside shack to presidential palace.

Widodo Indonesia
Joko Widodo wave to crowds while on his journey to the Presidential Palace by carriage Getty

The son of a furniture maker, Widodo grew up in a rented bamboo shack on the banks of the river Kalianyar in Solo, a town on Java Island.

He is the first Indonesian leader not to come from the country's super rich, and often corrupt, political, business and military elite.

Widodo, better known by his nickname of Jokowi, was elected with 53% of the vote, with most of his support coming from poor, non-urban Indonesians attracted by his simple demeanour and record of hard work as Jakarta governor.

Indonesia is the biggest economy in Southeast Asia, and about 90% of its people are Muslims. After years of dictatorship, the country was convulsed by political, ethnic and religious unrest in the late 1990s and early 2000s.

Since then, it has consolidated its democratic transition. While most of the country remains poor and inequality is rising, there is a rapidly expanding middle class.

Outgoing president Susilo Bambang Yudhoyono's two terms in office saw democratic consolidation and a focused fight against Islamist militancy. But economic growth on the back of a commodities boom has slowed, and a recovery is being hampered by weak infrastructure, rampant corruption and red tape.

Tens of thousands of supporters gathered on the streets of Jakarta, waving flags and banners to celebrate the unprecedented ascent of the small-town businessman to leader of the country with the world's biggest Muslim population.

Widodo, 53, is an avid heavy metal fan and is expected to join the celebrations later and jam with a rock band.