Image copyright AP Image caption The museum is the only one of its kind in the US, the Smithsonian says

The first black president of the US has formally opened the first US national museum about African-American history, in Washington DC.

Barack Obama said the $540m (£415m) museum represented a "common journey towards freedom".

The building, designed by British architect David Adjaye, sits on Washington's National Mall.

Mr Obama was joined by his predecessor George W Bush, who signed the bill in 2003 to allow construction to proceed.

Media playback is unsupported on your device Media caption President Obama: "This national museum...helps us better understand the lives, yes, of the president, but also the slave"

Speaking at the opening ceremony, Mr Obama urged African-Americans to "come here and see the power of your own agency".

"The very fact of this day does not prove that America is perfect, but it does validate the ideas of our founding - that this country born of change, of revolution, of we the people, that this country can get better."

Media playback is unsupported on your device Media caption John Lewis : "This place is more than a building - it is a dream come true"

Both Mr Bush and his wife Laura addressed the crowd. They were followed by Stevie Wonder, who performed the song Where Is Our Love.

Mr Obama then rang a bell belonging to one of America's oldest black churches to formally open the museum.

Image copyright EPA Image caption The Obamas and Bushes watched as a choir performed the US national anthem

The museum contains 36,000 items, ranging from trade goods used to buy slaves in Africa to a segregated railway car from the 1920s and a red Cadillac convertible belonging to rock'n'roll pioneer Chuck Berry.

Why do US police keep killing unarmed black men?

While some of the artefacts depict the slavery era, others show how black culture has come to define American culture, says the BBC's Nick Bryant in Washington.

Media playback is unsupported on your device Media caption George W Bush: "[A] great nation does not hide its history. It faces its flaws and corrects them"

Black veterans of the US Civil War first proposed an African-American museum in 1915.

However, it was not until 2003 that Congress approved its creation. Construction of the 37,200 sq m building took almost four years.

The museum's opening is being celebrated with three days of festivities, including concerts by artists such as rap group Public Enemy and the Preservation Hall Jazz Band.

It coincides with the latest protests engulfing two US cities following the killing of black men by police officers.