TOKYO (AP) — Tokyo Governor Yoichi Masuzoe was set to accept the Olympic flag in a handover during the closing ceremony at the Rio de Janeiro Games in just over two months.

Instead, Masuzoe submitted his resignation Wednesday, ending a weeks-long bid to stay in power in Tokyo and saddling the 2020 Olympic hosts with yet another scandal.

Masuzoe had come under intense questioning in the Tokyo Metropolitan Assembly for allegedly using political funds for personal purposes. Japanese media reported that the resignation would take effect June 21.

Masuzoe, a former health minister backed by Japan's ruling party, easily won an election in February 2014, and promised a successful 2020 Olympics.

He initially balked at the high cost of the games, and successfully lobbied to have some events moved to existing facilities instead of building costly new venues in Tokyo.

And the fact he could communicate in English and French was considered by many as an asset for the preparations.

"He had a strong emotional attachment to the games and spoke passionately about making them a success," Yuko Arakida, a member of the organizing committee's executive board, was quoted as saying by the Kyodo news agency. "Because of his foreign language proficiency, he brought social skills. It is extremely regrettable."

Masuzoe's troubles began earlier this year with revelations that he had stayed in expensive hotel suites at taxpayer expense on work trips to Europe and the United States, and used his official vehicle to travel regularly to a weekend retreat.

Preparations for the 2020 Games have been plagued by a series of scandals involving the new national stadium, the official logo and allegations of bribery in the bidding process.

Tokyo won its bid to host the 2020 Games under former governor Naoki Inose, who also resigned following a political funds scandal.

Yoshiro Mori, the president of the Tokyo 2020 organizing committee, called Masuzoe's resignation "regrettable."

"The Tokyo 2020 organizing committee considers the timing of this leadership change in the host city to be regrettable," Mori said in a statement, adding that the organizing committee "looks forward to working with the new governor and proceeding with efforts to ensure the smooth progress of Games preparations."

The first design of the new national stadium was scrapped over ballooning costs, putting construction of the new facility behind schedule. The original official logo of the games was also ditched over allegations of plagiarism in the design.

Leaders of Tokyo's winning bid have admitted making payments of $2 million to a Singaporean firm headed by Ian Tan Tong Han, a close associate of Papa Massata Diack, the son of former IAAF President Lamine Diack, who is facing corruption charges in France.

Japan's Olympic committee president Tsunekazu Takeda, who headed Tokyo's 2020 bid team, insists the payment was for legitimate consultancy work and not made with the anticipation that the money would lead to Diack.