Jakarta - President Joko Widodo has congratulated Mr Donald Trump on winning the 2016 presidential elections and pledged that Indonesia will continue its "mutually beneficial cooperation" with the United States.
"I also invite the President-elect of the United States to continue to work together to build peace and create prosperity for the world, he added in a statement issued by his press secretary on Wednesday (Nov 9) night.
Earlier in the day, Mr Joko had said he remains optimistic about US-Indonesia relations under a Trump presidency
"Our relationship will still be good, particularly in trade, America is a major investor in Indonesian and I believe that will not change," said Mr Joko.
He was speaking to reporters in Jakarta on Wednesday (Nov 9) afternoon, just moments before news broke that the US Republican nominee had beaten Democratic rival Hillary Clinton in the race for the White House.
Indonesians, however, had expected Mrs Clinton to win and take over from President Barack Obama, a favourite among locals in the capital after having spent some time in his youth in Jakarta.
A poll of more than 1,000 listeners by Indonesian station Radio Elshinta earlier on Wednesday morning had 86 per cent of respondents hoping for a Clinton victory.
Similarly an earlier survey of 100 people in the city by The Straits Times, found that more than 60 people preferred the former US Secretary of State to Mr Trump.
The average man or woman on the street in Jakarta expressed concern about the real estate mogul's fiery anti-Islamic stance - not a surprise considering that there 200 million Muslims living in Indonesia.
In 2015, Mr Trump had called for a ban on Muslims entering the US as well as demanded that they undergo "extreme vetting".
He also claimed that Muslims in New Jersey had cheered during the Sept 11 terrorist attacks.
Most people in Indonesia, like people elsewhere, were shocked by the results, which came out just after lunch time in Jakarta.
The Indonesian stock exchange was the first to react when Mr Trump took the lead, securing electoral votes expected to go to Mrs Clinton.
The Jakarta Composite Index (JCI) fell more than 2 per cent on Wednesday morning from Tuesday's close, but rallied slightly later in the afternoon.
The drop, however, almost wiped out gains of the past three trading days, as traders cashed in their profit amid an upset in the US presidential race.
Another issue that concerned Indonesia as well as South-east Asia, where trade with the US is key to the economy, is the Trans-Pacific Partnership (TPP).
Mr Trump has openly opposed the trade pact - which covers the US and 11 countries in Asia-Pacific but notably excludes China.
Mr Joko had expressed Indonesia's interests in joining the TPP during his state visit to the US in 2015.
When asked what will happen to the TPP in the event of a Trump victory, Mr Joko said discussions on the deal are still underway.