Eugene Hoshiko, AP
Philippine President Rodrigo Duterte speaks to journalists after a coast guard training demonstration at a Japan Coast Guard base in Yokohama, Thursday, Oct. 27, 2016. Duterte is on a three-day official visit to Japan, his first as Philippine leader.

MANILA, Philippines — The foul-mouthed Philippine president, who once called the pope a "son of a bitch" and told Barack Obama to "go to hell," says he has promised to God he won't spew expletives again.

President Rodrigo Duterte's profanities have become a trademark of his political persona, especially when threatening to kill drugs dealers as part of his war on illegal drugs that has left thousands dead since he took office at the end of June.

Duterte made the stunning pledge on arrival in in his southern hometown of Davao city late Thursday from a trip to Japan.

He said that while flying home, he was looking at the sky while everyone was sound asleep and he heard a voice that said "'if you don't stop epithets, I will bring this plane down now."

"And I said, 'Who is this?' So, of course, 'it's God,'" he said.

"So, I promise God to ... not express slang, cuss words and everything. So you guys hear me right always because (a) promise to God is a promise to the Filipino people."

Duterte's vow was met with applause, but he cautioned: "Don't clap too much or else this may get derailed."