Former President Barack Obama took a shot at his successor while traveling in Indonesia, saying President Trump had caused a "temporary absence of American leadership" on climate policy.

"In Paris, we came together around the most ambitious agreement in history to fight climate change," Obama said Saturday, per Bloomberg. "[A]n agreement that even with the temporary absence of American leadership will still give our children a fighting chance."

Trump withdrew the United States from the Paris climate agreement, months after Obama's team raced to finalize an international climate accord before he left office. That decision angered Democratic leaders, although Trump had long cited the pact as an example of American leaders negotiating poorly.

"The agreement is a massive redistribution of United States wealth to other countries," Trump said in June when he announced the withdrawal. He promised to renegotiate an international deal or adopt new policies that don't cramp the U.S. economy.

"We will be environmentally friendly, but we're not going to put our businesses out of work," Trump said.

Obama urged Indonesian leaders to continue partnering with the United States. "The challenges of our times, whether it's economic inequality, changing climate, terrorism, mass migration; these are really challenges and we're going to have to confront them together," he said.