Philippines President Rodrigo Duterte addresses the resident Filipino community at a convention hall in Singapore, April 28, 2018. REUTERS/Feline Lim

MANILA (Reuters) - Philippine President Rodridgo Duterte said on Sunday North Korean leader Kim Jong Un, whom he had previously called a “fool”, is now the “hero of everybody”, after Kim pledged to work with Seoul for “complete denuclearisation” of the peninsula.

Duterte said he would “congratulate” Kim, who just became his “idol”, if he gets a chance to meet him. He said he would tell the North Korean leader “I admire you. You know how to time (your moves)”.

“For all of the time, he was pictured to be the bad boy of the community. With one masterstroke, he is now the hero of everybody,” Duterte said when asked to comment on the historic meeting between Kim and South Korean President Moon Jae-in during a news conference after he returned from an ASEAN summit in Singapore.

“He appear to be amiable, jolly good fellow, and very accommodating,” Duterte said of Kim.

Duterte has more than once criticized Kim over his nuclear ambitions. In April last year he questioned his sanity and urged the United States to show restraint and not be baited by a man who “wants to end the world”.

A few months later, Duterte called Kim a “fool” and held nothing back in rebuking Kim for “playing with dangerous toys”.

The leaders of North and South Korea agreed on a common goal of a “nuclear free” peninsula during a summit on Friday.

Meeting at the Demilitarized Zone that has divided the Koreas for more than six decades, Kim and Moon announced they would work with the United States and China this year to declare an official end to the 1950s Korean War, and establish a permanent peace agreement.

“He (Kim) can treat me as his friend ...The impact is really, there is less stress now in the Korean Peninsula. And maybe, just maybe, we can avoid a war which nobody can win anyway,” Duterte said.