Japan's Prime Minister Shinzo Abe has been forced to resign due to ongoing poor health.
He had made two visits to hospital in the past week.
One of his hospital visits lasted almost eight hours.
Abe is known to suffer from ulcerative colitis, a chronic condition that was partly responsible for forcing him out of office after just a year during his previous term as prime minister in 2007.
Article 9 of Japan's Cabinet law says that if a prime minister is prevented from discharging his functions, or the post is vacant, a minister of state he has designated in advance will temporarily perform the role.
An extra session of Parliament is likely from October or later, media said, and an election for parliament's powerful lower house must be held by late October 2021.
National broadcaster NHK said Abe wanted to avoid causing problems to government due to a worsening of his chronic health condition.
Abe has been in office since 2012. It is second stint as prime minister, he resigned from his first term in 2007 because of struggles with ulcerative colitis.
He is Japan's longest serving prime minister.
Ulcerative colitis is an inflammatory bowel disease that causes long-lasting inflammation and ulcers (sores) in the sufferer's digestive tract.
Ulcerative colitis can be debilitating and can sometimes lead to life-threatening complications. While it has no known cure, treatment can greatly reduce signs and symptoms of the disease and even bring about long-term remission.
Abe marked his 2799th consecutive day in office since returning to leadership in late 2012 for a second term, surpassing the previous record set by Eisaku Sato, his great-uncle, who served 2798 straight days from 1964 to 1972.
Abe, who turns 66 next month, became Japan's longest-serving prime minister last November, combining his earlier one-year term.
His first term ended abruptly 13 years ago because of health problems, fueling concerns about his current condition. The prime minister made a hospital visit for the second week in a row earlier this week.
Abe later told reporters that he revisited the hospital "to get detailed results from last week's checkup and have additional examination."
"I'm making sure I'm in good health, and I plan to keep working hard," Abe said, adding that he will explain his health later.
Abe has acknowledged having ulcerative colitis since he was a teenager and said the condition has been under control. He has not made clear if it is related to his recent health issues or hospital visits.