Prime Minister Scott Morrison says he will miss his "friend and mentor" Shinzo Abe, describing him as a sincere leader and "true friend" to Australia.
Japan's Prime Minister Shinzo Abe will resign over health problems, in a bombshell development that will end a record-setting tenure with no clear successor yet in place.
Mr Abe announced the decision in a press conference on Friday evening, revealing that his chronic condition of ulcerative colitis had returned earlier this year.
"I have decided to step down from the post of the prime minister," he said, adding that he had been "pulling out all the stops" to fight the coronavirus pandemic.
"The most significant challenge for us is the countermeasures against coronavirus ... for the last month that was the only focus I had."
Politicians had earlier revealed the prime minister's decision after he told them about it at an emergency meeting of the ruling Liberal Democratic Party on Friday.
"I heard his plan. It was sudden and unexpected. I am stunned," close ally Tomomi Inada told reporters.
The announcement sent Tokyo stocks plunging more than two per cent, with the benchmark Nikkei 225 index reversing earlier gains.
Ms Inada told reporters the prime minister will stay in office until a successor is decided, most likely through an election of ruling party politicians and members.
"I would like to regain my health again so that I can stand behind a new administration as a politician," Mr Abe told reporters.
Australian Prime Minister Scott Morrison on Friday said he was thankful for his "friend and mentor" Mr Abe and wished him all the best in his recovery.
"I’ll never forget laying a wreath side by side with him at the Darwin Cenotaph as we remembered those killed in the Japanese bombing raids on Darwin," he wrote on Twitter.
"I will miss him greatly in the role of PM as a friend and a mentor."
Rumours about Mr Abe's possible resignation had intensified after two recent surprise hospital visits for unspecified medical checks, but in recent days, senior government officials had suggested he would serve out the rest of the remaining year in office.
But the decision nonetheless comes as "a big surprise", said Shinichi Nishikawa, a professor of political science at Meiji University in Tokyo.
"His resignation comes at a time when Japan is facing tough issues, including measures against the coronavirus," he said. "There may be political confusion."
The resignation will be a bitterly familiar scenario for Mr Abe, who stepped down just one year into his first term, in 2007 as a result of the same condition.
He returned to office in 2012, stating the illness was under control with the help of new medication.
The decision comes despite the insistence of government spokesperson Yoshihide Suga on Friday morning that Mr Abe remained in good health.
"I see him every day and feel that there is no change in his condition," Mr Suga told reporters at a regular press conference.
And on Thursday, Mr Suga told Bloomberg News that Mr Abe would "of course" be able to serve out the rest of his term, which ends September 2021. "He'll be all right," he said.
But the health woes appear to have piled on the pressure for Mr Abe, who this week broke the record for the longest uninterrupted stint in office in Japanese history.
Despite the relatively contained impact of the coronavirus in Japan, Mr Abe's government has been heavily criticised for its approach to the crisis, including a U-turn on stimulus payments and a much-mocked decision to issue each household two cloth face masks.
The prime minister has also seen his signature "Abenomics" economic policy come under increasing strain, with the country already slumping into recession even before the coronavirus crisis hit.
Still, experts had said there was little appetite within the Liberal Democratic Party for Mr Abe to depart early, especially as there is no consensus yet on his successor.
And with Japan's fragmented opposition so far unable to capitalise on the government's falling approval ratings, there had appeared to be little immediate pressure on him to step down.
If Mr Abe's health required him to leave office immediately, the premiership would pass initially to a caretaker government.
But initial reports suggest Mr Abe plans to stay in office while a leadership contest is organised and party officials and members vote on his successor.
Among the candidates are deputy prime minister Taro Aso - who also serves as finance minister - and chief cabinet secretary Yoshihide Suga, as well as former and current cabinet ministers.
Additional reporting by Maani Truu.