Barack Obama has written an emotional letter to America on his final day in office, saying: "You made me a better President, and you made me a better man."
The outgoing commander-in-chief thanked US citizens for the honour of serving as 44th president in the note posted on Medium, adding that he would also leave one at the White House for Donald Trump.
"All that I've learned in my time in office, I've learned from you," he told his fellow Americans. "You have been the source of goodness, resilience, and hope from which I've pulled strength."
After a year of terrorist attacks and mass shootings, he said he had mourned with grieving families and singled out the "grace" of those at an African American church in Charleston, South Carolina, where Dylann Roof shot dead nine people in hopes of igniting a race war.
Mr Obama also praised "neighbours and communities who cared for each other during the worst economic crisis of our lifetimes."