Barack Obama took a leaf out of his successor's book to defend his legacy, just weeks before leaving office. Like President-elect Donald Trump, Obama took to Twitter to mark the "progress" his administration had made in two terms.

"As we look ahead to the future, I wanted to take a moment to look back on the remarkable progress that you made possible these past eight years," the president tweeted as he kicked off a seven-message series of tweets.

Obama first tackled his administration's handling of the financial crisis and affordable healthcare. "Facing the worst financial crisis in 80 years, you delivered the longest streak of job growth in our history," he tweeted, along with an infographic noting that 15.6 million private jobs were added in the past 81 months.

He continued: "After decades of rising health care costs, today nearly every American now has access to the financial security of affordable health care." The accompanying infographic said that the percentage of Americans without health insurance has dropped by nearly half,from 16% in 2010 to 8.9% in 2016.

The outgoing Democratic president then touted his administration's move towards green energy, highlighting how the dependence on foreign oil has dropped by more than half from 2008 to 2015. "We traded foreign oil for clean energy, we doubled fuel efficiency standards, and we acted on a global scale to save the one planet we've got," Obama tweeted.

While dependency on foreign oil dropped, so did the number of US troops abroad, he noted.

Obama also celebrated making "history in our work to reaffirm that all are created equal" through the passage of marriage equality. "It's been the privilege of my life to serve as your president. I look forward to standing with you as a citizen. Happy New Year everybody," he concluded.

CNN reported that Obama's tweets came on the heels of Trump's incoming White House press secretary, Sean Spicer, saying that the president-elect will immediately "repeal a lot of the regulations and actions that have been taken by this administration over the last eight years that have hampered both economic growth and job creation".

Spicer did not specify which executive actions Trump would repeal. However, the incoming president has long been critical of Obama's policies on immigration, green energy and foreign policy.

Obama's tweets under the @POTUS handle will be maintained under a new handle, @POTUS44, that will be launched after he leaves office, the White House has announced. Trump will then take over the @POTUS account.

According to ABC News, Obama will visit the Capitol on Wednesday (4 January) to meet with house and Senate Democrats to establish a common strategy to prevent his signature healthcare law from being destroyed by Republicans. The president is also planning a speech in his hometown of Chicago on 10 January.