Washington (AFP) - President Barack Obama hailed Saturday the opening of the National Museum of African American History and Culture in Washington, a long-awaited testament to black suffering and triumph in the United States.

The first black president of the United States cut the ribbon to inaugurate the striking 400,000-square-foot (37,000-square-meter) bronze-clad edifice before thousands of spectators gathered in the US capital at a time of growing racial friction.

"African American history is not somehow separate from our larger American story. It's not the underside of the American story," said Obama. "It is central to the American story."

The star-studded public ceremony, just four months before Obama leaves office, included Stevie Wonder and Oprah Winfrey.

The Smithsonian's 19th addition to its sprawling museum and research complex is the first national museum tasked with documenting the uncomfortable truths of the country's systematic oppression of black people, while also honoring the integral role of African American culture.

"A clear-eyed view of history can make us uncomfortable," Obama said.

"It is precisely of that discomfort that we learn and grow and harness our collective power to make this nation more perfect. That's the American story that this museum tells."

Guests of honor on stage included four generations of the Bonner family, led by 99-year-old great-grandmother Ruth, the daughter of a slave who went on to graduate from medical school.

After Obama declared the museum "open to the world," it was she -- stooped in stature but smiling broadly -- who tugged on a rope to ring an antique bell from a historic black church, sealing the inauguration.

- Deteriorating race relations -

Elected in a wave of optimism in 2008, Obama pledged to unify, often repeating that he is not the president of black Americans but of all Americans.

But as his presidential mandate comes to an end, polls show that most Americans believe US race relations are faring badly.

Story continues

The recent fatal police shootings of black men in Tulsa, Oklahoma as well as in Charlotte, North Carolina -- and the protests that followed -- laid bare yet again the country's racial disquiet.

Obama delivered his Saturday address amid these ever-heightening tensions, as national outrage grows over the spate of deaths of black men at the hands of police, prompting mass demonstrations.

The president emphasized that a museum alone cannot solve the ills of a country still struggling to overcome a dark legacy of slavery and racial prejudice, but said it "provides context for the debate of our times."

Republican presidential nominee Donald Trump, who is seeking to shore up black voter support, meanwhile, stumbled over the building's name, calling it the "Smithsonian national museum of American history, African American art."

Trump, who has been accused of racism toward several minority groups, hailed African Americans' "incredible contributions" to the United States, as he spoke to a crowd of supporters in Virginia.

- 'Hallowed ground' -

The dramatic building -- set in a prime location near the White House and the Washington Monument -- features three inverted-pyramid tiers sheathed in bronze-painted filigree panels that house more than 34,000 objects, nearly half of them donated.

It reaches 70 feet (21 meters) below ground, where a crypt of galleries wind from slavery to civil rights to Black Lives Matter, ascending into upper floors that include testaments to African-American cultural contributions.

"I'm so happy to see that so many people of color are coming out together just to celebrate themselves and one another," said 50-year-old Derek Jones, who ventured from New York to attend Saturday's celebration that included music, poetry and dancing.

"It's amazing to get this opened by the end of Obama's eight years," Jones said, adding that he is "proud that he's still president during the opening -- it's really profound."

Thousands of people attended free outdoor concerts with often political tones denouncing racism and police brutality in the evening, with more to follow Sunday.

Living Colour, Public Enemy and The Roots were among the performing groups.

"When is it going to stop? How many more names will we need to memorize? How many more? How many more before the end of the year?" said Living Colour vocalist Corey Glover.

"Any one of us can be at the wrong place at the wrong time."

Ringing up to $540 million -- half of which was raised from private donations -- the museum shows "that this country born of change, this country born of revolution, this country of we the people, this country can get better," Obama said.

"It is a monument, no less than the others on this mall, to the deep and abiding love for this country and the ideals upon which it is founded. For we, too, are American."