U.S. President Donald Trump paid tribute Saturday to the leaders and foot soldiers of the civil rights movement whose sacrifices help make the United States a fairer and more just country, though protests surrounding his visit to Mississippi laid bare the stark divisions among Americans about his commitment to that legacy.

As Trump gazed at an exhibit on Freedom Riders at the new Museum of Mississippi History and the Mississippi Civil Rights Museum, demonstrators near the site held up signs that said "Make America Civil Again" and "Lock Him Up." Some shouted "No Trump, no hate, no KKK in the USA."

Trump spent about 30 minutes at the museums, gave a 10-minute speech to select guests inside and then flew back to his Florida estate, skipping the public schedule of the dedication ceremony held outside on a chilly day. He spent more time getting to Jackson than he did on the ground.

It was my great honor to celebrate the opening of two extraordinary museums-the Mississippi State History Museum & the Mississippi Civil Rights Museum. We pay solemn tribute to our heroes of the past & dedicate ourselves to building a future of freedom, equality, justice & peace. <a href="https://t.co/5AkgVpV8aa">pic.twitter.com/5AkgVpV8aa</a> —@realDonaldTrump

Trump's remarks steered clear of addressing the anger that his participation had sparked leading up to the dedication. In a deliberate voice and rarely diverting from his prepared words, the president sought to honour the famous and the anonymous for their efforts on behalf of freedom for all.

"The civil rights museum records the oppression, cruelty and injustice inflicted on the African-American community, the fight to bring down Jim Crow and end segregation, to gain the right to vote and to achieve the sacred birthright of equality. And it's big stuff. That's big stuff," he said.

"Those are very big phrases, very big words. Here we memorialize the brave men and women who struggled to sacrifice and sacrifice so much so that others might live in freedom," he said.

The national president of the NAACP and the mayor of Mississippi's capital city said they kept their distance from Trump because of his "pompous disregard" for the values embodied by the civil rights movement.

Derrick Johnson, head of the nation's oldest civil rights organization, and Mayor Chokwe Lumumba said at a news conference that they looked forward to a "grander opening" of the museum that they can attend.

Johnson, a Mississippian, charged that Trump opposes labour rights, education, health care and voting rights for all Americans.

"We will never cede the stage to an individual who will fight against us," Johnson said. "We will not allow the history of those who sacrificed to be tarnished for political expediency."

'Pompous disregard'

Johnson and Lumumba spoke to about 100 supporters, including some who participated in the civil rights demonstrations of the 1960s, at Smith Robertson Museum and Cultural Center. Once the first public school built for African-Americans in Jackson, it's now a museum to black history and culture.

U.S. President Donald Trump appears at opening of civil rights museum in Mississippi amid protest and criticism from civil rights leaders 0:27

Lumumba called Trump to task for "his pompous disregard for all of those factors that will not enable us to stand with him today."

One of the protesters, Laurie Bertram Roberts, told CBC News that Trump had "no place" at the event and that he has a "horrible record on civil rights, human rights."

She said Mississippi Gov. Phil Bryant should also have missed the event, after proclaiming April of this year to be Confederate Heritage Month in his state.

The state's attorney general, Jim Hood, criticized Bryant for inviting the U.S. president.

"It threw cold water in the face of people who fought the battles for civil rights," Hood said.

Bryant, who introduced Trump, spoke of "the emotion that comes over you in waves as you see the past, the struggle, the conflict. I'm so very proud today that the president of the United States was here to see and witness it."

Museums 'labours of love'

Trump reflected on the past and hoped for a bright future, drawing on the achievements of civil rights veterans: "Today we strive to be worthy of their sacrifice. We pray for inspiration from their example. We want our country to be a place where every child from every background can grow up free from fear, innocent of hatred and surrounded by love, opportunity and hope. Today we pay solemn tribute to our heroes of the past and dedicate ourselves to building a future of freedom, equality, justice and peace."

He called the museums "labours of love — love for Mississippi, love for your nation, love for God-given dignity written into every human soul. These buildings embody the hope that has lived in the hearts of every American for generations, the hope in a future that is more just and more free."

U.S. President Donald Trump greets Charles Evers, brother of slain civil rights leader Medgar Evers. Trump was visiting the Civil Rights Museum in Jackson, Miss. (Kevin Lamarque/Reuters)

Singled out by the president was Medgar Evers, the Mississippi NAACP leader who was shot to death outside his home in 1963. His widow, Myrlie, was in the audience for Trump's speech and drew a standing ovation when he acknowledged her.

Trump said Medgar Evers "knew it was long past time for his nation to fulfil its founding promise to treat every citizen as an equal child of God." Evers, Trump said, now rests in Arlington National Cemetery "beside men and women of all races, backgrounds and walks of life who've served and sacrificed for our country. Their headstones do not mark the colour of their skin but immortalize the courage of their deeds."

'We are all Americans'

Myrlie Evers did not mention Trump in her remarks a short time later at the public ceremony outside the museum. "Regardless of race, creed or colour, we are all Americans.... If Mississippi can rise to the occasion, then the rest of the country should be able to do the same thing," she said.

Among the high-profile figures to stay away was U.S. Rep. John Lewis, a leader of the civil rights movement. Lewis, who was among scores of Democratic lawmakers who skipped Trump's inauguration in January to protest his record on race, said Trump's presence at the museum opening was an insult.

President Trump’s attendance and his hurtful policies are an insult to the people portrayed in this civil rights museum. After President Trump departs, we encourage all Mississippians and Americans to visit this historic civil rights museum. <a href="https://t.co/cXo11eGHZw">https://t.co/cXo11eGHZw</a> —@repjohnlewis

The White House accused Lewis and others of injecting politics into a moment it said could be used to bring people together.

Trump has been accused of harbouring racial animosity, and critics cite his blaming of "both sides" for deadly violence at a white supremacist rally in Charlottesville, Va., over the summer. Trump has also repeatedly criticized NFL players for kneeling during the national anthem to protest racism and police brutality largely directed at African-American males.

During the presidential campaign, Trump called for a "complete and total shutdown" of Muslims entering the U.S.