MANILA -- Doubts over Rodrigo Duterte's health -- and his latest threat to step down as president -- lay bare deep political divisions in the Philippines.

Duterte said in a speech Thursday he would move aside if a recent medical test revealed he had cancer. He said he underwent an endoscopy and a colonoscopy three weeks ago, and his doctors have now advised him to repeat the examination.

"If it's cancer, it's cancer," he said. "And if it's third stage, no more treatment. I will not prolong my agony in this office or anywhere."

The 73-year-old has previously broached the idea of cutting short a six-year term that ends in 2022 because of illnesses related to his spine.

But should he go, he said he would not hand the leadership to Vice President Leni Robredo, an opposition lawmaker who has been a critic of Duterte's brutal war on drugs.

"I do not mean to offend the lady. She's very good. She's gentle. But she is really weak," Duterte said.

Under the constitution, the president is required to disclose any serious illness to the public, and will be replaced by the vice president should he step down.

The president's health is being watched closely in a country still divided by the 2016 elections that brought Duterte to power. The fight to replace Duterte could be vicious: the vice president is likely to seek the leadership through constitutional channels, while rivals could seek to smear her name.

Duterte said in August he was willing to step down if former Senator Ferdinand "Bongbong" Marcos won an electoral protest against Robredo.

"There are segments of the Philippine society that are polarized and if the president goes, this polarization will flow to the surface more obviously," said Bob Herrera-Lim, a managing director at risk management consultancy Teneo Holdings.

"There will be agitation from Duterte and Marcos supporters to discredit Robredo as the constitutional successor," he said, adding that supporters of the vice president, as well as institutions such as the Catholic Church, will call for constitutional procedure to be followed.

In August, Duterte suggested he preferred a military junta to take over the government. On Thursday, the president said would appoint Lieutenant General Rolando Bautista as the social welfare secretary after he retires from service next week -- adding to a list of retired generals in his cabinet.

"The military will only step in if they sense a scenario of disorder, unrest, and if the threat of imminent political and social conflict increases," Lim said

Despite his high popularity ratings, Duterte always claims the opposition -- in connivance with communist rebels -- is aiming to topple his government.

The latest remarks about his health could be a form of loyalty check, said Ramon Casiple, executive director at the Institute for Political and Electoral Reform in Manila.

"He wants to see who are his allies and opponents. It's part of his management style," he added. "Senatorial aspirants will be filing their candidacies next week as part of the May 2019 midterm elections."