Former president Barack Obama has jokingly thanked himself in a speech outlining the economic achievements of his administration.

Obama drew attention to the Paris Climate Agreement, the international climate accord he helped forge during his presidency, which his successor President Donald Trump has now withdrawn the US from.

During a speech at the North American Climate Summit in Chicago on Tuesday, the ex-president said: “We met resistance every step of the way.”

He continued: “There were sceptics who said these actions would kill jobs and depress growth. As we took these actions, we saw the US economy grow consistently.”

“We saw the longest streak of job creation in American history by far. A streak that still continues, by the way.”

“Thanks, Obama,” he added, prompting laughter and applause from the audience.

This was an apparent nod to the “Thanks Obama” meme which was started by conservatives on Twitter in 2009 and 2010 to thank Obama for their frustrations with his presidency such as healthcare reform.

But the meme was re-appropriated after the 2010 midterm election to sarcastically blame Obama for every mishap imaginable, including everything from a man spilling food to the power going out at the Super Bowl in 2013.

Obama also used the speech to address President Trump’s decision to withdraw the US from the landmark climate agreement, saying it was “difficult to defend.”

Joe Biden and Barack Obama through the years Show all 15 1 /15 Joe Biden and Barack Obama through the years Joe Biden and Barack Obama through the years Joe Biden and Dr Jill Biden watch Barack Obama's farewell speech on 11 January. Obama called Biden his 'brother' Joe Biden and Barack Obama through the years US President Barack Obama speaks alongside US Vice President Joe Biden about the Affordable Care Act AFP/Getty Images Joe Biden and Barack Obama through the years Vice President Joe Biden and President Barack Obama Getty Joe Biden and Barack Obama through the years President Obama listens to Joe Biden speak of his work on defeating cancer on 18 October in the White House Reuters Joe Biden and Barack Obama through the years U.S. President Barack Obama is applauded by House Speaker Paul Ryan and Vice President Joe Biden while delivering his final State of the Union address to a joint session of Congress in Washington Reuters Joe Biden and Barack Obama through the years U.S. Vice President Joe Biden interjects as President Barack Obama delivers remarks at a reception for the 25th anniversary of the White House Initiative on Educational Excellence for Hispanics at the White House in Washington REUTERS Joe Biden and Barack Obama through the years Obama and Vice President Joe Biden react after a heckler was removed for their extended interruption (Reuters) Joe Biden and Barack Obama through the years U.S. President Barack Obama shakes hands with Speaker of the House John Boehner (R) as Vice President Joe Biden looks on Joe Biden and Barack Obama through the years Barack and Michelle Obama and Vice-President Joe Biden observing a moment of silence outside the White House to mark the 13th anniversary of the 9/11 attacks Getty Images Joe Biden and Barack Obama through the years Barack Obama and Joe Biden putt on the White House putting green Getty Joe Biden and Barack Obama through the years President Barack Obama and Joe Biden in April 2013 AFP/Getty Images Joe Biden and Barack Obama through the years January 1, 2013: U.S. President Barack Obama winks as he arrives with Vice President Joe Biden (L) in the briefing room Reuters Joe Biden and Barack Obama through the years President Barack Obama, Vice President Joe Biden and others receive an update on the mission against Osama bin Laden in the Situation Room of the White House May 1, 2011 in Washington, DC Getty Images Joe Biden and Barack Obama through the years Vice-President Joe Biden, right, confirmed that the US was looking at ways of taking legal action against Julian Assange - back in December 2010 GETTY IMAGES Joe Biden and Barack Obama through the years Joe Biden, left, and retired military officers watch President Barack Obama sign orders to close down the detention centre at Guantanamo Bay, Cuba, in January 2009 GETTY IMAGES

“But the good news is that the Paris agreement was never going to solve the climate crisis on its own. It was going to be up to all of us,” he said.

President Trump announced he would be withdrawing the US from the Paris Climate Agreement in June, making the US the only country in the world not to get behind the framework deal to tackle greenhouse gas emissions.

Obama did not explicitly mention Mr Trump by name during the 14-minute speech but made a plea for officials who were there to persevere with efforts to tackle climate change in spite of the Trump administration’s attitude to the planet warming.

He applauded American mayors, academics and business leaders as being the ”new face of American leadership on climate change“.

The accord was signed by nearly 200 countries in December 2015 in an attempt to restrict global greenhouse gas emissions and limit global warming to within two degrees Celsius.

”In this environment right now, it's easy sometimes to feel discouraged, and feel as if people are talking past each other,“ Obama said.

"This is where the particular talents of mayors come in. Because first of all, you are used to dealing with folks who can sometimes be unreasonable. You are accustomed to having to deal with the realities in front of you and take action, not just talk about it.“