Barack Hussein Obama made history on November 4, 2008, when he easily defeated Republican rival John McCain to become the first black president of the US.
Aged 47 when he was inaugurated, Mr Obama was also the first urban president since Harry Truman, and the first president born in Hawaii.
And unlike McCain, George Bush and Bill Clinton, his background was not steeped in the Vietnam War or the cultural conflicts of the 1960s.
Mr Obama was born in 1961 and named after his father, a Kenyan intellectual who met the future president’s mother, Ann, a white teenager from Kansas, while studying at the University of Hawaii.
When Mr Obama was a toddler, his father abandoned the family and the couple divorced. Father and son were to meet only once more, during a brief visit to Hawaii in 1971 by the elder Barack Obama. He died in a car crash in 1982 in Nairobi.
When Mr Obama was six, his mother married an Indonesian man and the family moved to Jakarta. Then known as ‘Barry’, Obama later moved back to Hawaii, where he was raised mainly by his grandparents.
After graduating from Columbia University in New York, Obama worked for three years as a community organiser in poor neighbourhoods in Chicago.
He then attended Harvard Law School, becoming the first African-American president of the Harvard Law Review.
While working at a Chicago law firm, he met Michelle Robinson. The couple married in 1992 and have two daughters – Malia and Sasha. The Obamas became the first couple since Jimmy and Rosalynn Carter to live in the White House with young children.
After Harvard, Obama returned to Chicago to practise civil rights law, representing victims of housing and employment discrimination.
He joined the law faculty at the University of Chicago, where he was lauded as a popular teacher and an exceptional legal thinker.
In 1995 he published his first book, Dreams from My Father, a memoir, and the following year he was elected to the Illinois state senate.
Mr Obama tried to run for Congress in 2000, but was thrashed by the incumbent in a Democratic primary. But four years later he ran for the US Senate and he won. After his landslide election, he became one of the most visible figures in Washington, and soon published a second best-selling book, The Audacity of Hope.
When he embarked on his presidential campaign in February 2007, he had been in the Senate only two years, and his opponents sought to cast him as ill-prepared for the presidency.
But his campaign excited millions of liberals, especially young voters - who were yearning for something new in Washington after two terms under George W Bush.
Mr Obama clinched the Democratic nomination after a long and gruelling battle against former first lady Hillary Clinton.