The Indonesian President has postponed his trip to Australia after criticising "political actors" for their role in a violent and chaotic protest in Jakarta that saw vehicles set alight and dozens hospitalised.
Joko Widodo was scheduled to depart for Sydney on Saturday and had been keen to pursue the issues of trade, investment and increased maritime co-operation.
But when an otherwise peaceful protest in the capital spiralled into violence on Friday night, with angry protesters hurling stones at police, it was no time to leave.
"The current development has required the president to stay in Indonesia," the Foreign Ministry said in a statement on Saturday, adding it was with "deep regret" that he would need to postpone the visit.
"The relations between Indonesia and Australia is in its best shape.
"It is the mutual commitment of both countries to further strengthen this important relationship."
Prime Minister Malcolm Turnbull said he told President Widodo "we were sorry we would not be able to welcome him to Australia ... but entirely understood the need for him to remain in Indonesia at this time".
"We both expressed disappointment the visit would not go ahead, particularly given the strength of the bilateral relationship and our personal friendship."
The comments came just hours after President Widodo gave a midnight press conference expressing regret the otherwise peaceful protest had taken an ugly turn after dark.
"I regret the incident after night prayer ... it turned out to be chaotic. And here, we see (that they) have been jockeyed by political actors who were taking advantage of the situation."
Up to 150,000 people are estimated to have marched through the capital, shutting down major streets as they demanded the immediate jailing of Jakarta's governor over comments he made about the Koran.
While largely peaceful throughout Friday, National Police spokesman Boy Rafli Amar said protesters breached the barricade after 6pm, demanding to get inside the presidential palace, prompting police to fire tear gas.
Describing the protest as "brutal" and "anarchic", police said eight military and officers were badly injured, three military and police vehicles were burnt and 18 damaged with rocks.
Several men ranging from 16 to 31 years have been detained, all of whom are from outside Jakarta.
About 160 people were treated for tear gas inhalation at a Jakarta hospital, while one man died after an asthma attack.
The protest, which was spearheaded by the hardline Muslim group, the Islamic Defenders Front (FPI), was calling for the immediate arrest of Basuki Tjahaja Purnama, commonly referred to as Ahok, who is the capital's straight-talking Christian governor and ethnically Chinese Indonesian.
Tensions over his leadership were inflamed when he said in late September his detractors were using a verse in the Koran to manipulate followers into not voting for him.
The verse has been interpreted by some to mean Muslims should not elect a non-Muslim leader.
Ahok has apologised and insists he meant no offence but he is under investigation for blasphemy charges.
Indonesia and Australia will discuss when the visit can be rescheduled.