CAPE COAST, Ghana — With the unrelenting Ghanaian sun serving as her spotlight, Melania Trump has stepped out of her husband’s shadow, apparently showing the world what some 5,200 miles of breathing room away from her home city can do.
On Wednesday morning, on the second day of a four-nation African tour, the first lady looked more comfortable striding into a meeting with local leaders on the coast of Ghana than she has perhaps ever looked in Washington.
Given the bedlam of late in the American capital, that may be understandable. But as she makes her first big solo trip abroad, Mrs. Trump seems ready to show another side of herself: the happy one.
Mrs. Trump has offered simple acts of grace on behalf of an administration with a fraught diplomatic history with Africa. She has spent much of her time just expressing appreciation to her hosts.
“Thank you very much for having me,” she told the Ghanaian first lady, Rebecca Akufo-Addo, when the two met.
“Thank you for having me,” she said to a small cluster of Ghanaians before entering a palace hall.
“Thank you for your warm welcome,” she signed in the guest book of a stone fort through which thousands of enslaved people once passed.
From the moment she touched down here on Tuesday, Mrs. Trump has done her best to soften the image of an administration known for its sharp elbows, and of a president who outraged many Africans with his disparaging remarks.
How well it will work remains to be seen.
Marie-Franz Fordjoe, a journalist, said it might take more than a visit from Mrs. Trump to heal the bruised feelings. The visit, she said, is “insignificant, as we are very much aware of President Trump’s isolationist foreign policy and his overt aversion to people of color.”
Acquaintances of the first lady said the trip was also giving her a chance to show the world what she is really like when she is not onstage in Washington and swamped by cameras.
“That’s the first lady I know,” said Stephanie Grisham, Mrs. Trump’s communications director. “She loves meeting people, learning new things and being around kids. This is who she is.”
Chris Ruddy, a friend of the Trumps, said the qualities Mrs. Trump shows in private were now showing themselves.
“It is true of successful first ladies that they have shined when they are away from the spotlight on their husband,” Mr. Ruddy said. “Melania is a remarkably caring and charismatic person, and these trips demonstrate that.”
Mrs. Trump had some especially tricky terrain to navigate on Wednesday when she visited the Emintsimadze Palace to officially ask a regional chief for permission to visit that fort.
Flanked by girls playing traditional horns, the first lady walked slowly into a room with a large photograph hanging in it. Its name? Obama Hall. The photo? A picture of the man who preceded her husband in office. President Barack Obama and his family made the same journey in 2009.
After Mrs. Trump’s aides presented a basket of gifts, a charmed-looking chief granted his permission for her to visit the fort, Cape Coast Castle.
There, as the waves of the Gulf of Guinea crashed against the shore, the first lady wandered the passageways, poking her head into hatches that offered a view into the depths of ancient dungeons where slaves were kept in hellish conditions until they were sent abroad. (When Mr. Obama visited, he said the castle “reminds us of the capacity of human beings to commit great evil.”)
Mrs. Trump spent a few minutes in a dungeon that once housed male slaves before they were dragged across the threshold of the “door of no return” and to waiting ships. She paused at the archway — and then stepped through.
Mrs. Trump generally avoids journalists, but at the castle on Wednesday, she fielded their questions. Her tone was sober.
“I will never forget the incredible experience and the stories that I heard,” she said. “The dungeons that I saw — it’s really something that people should see and experience what happened so many years ago. It’s really a tragedy.”
Mrs. Trump’s visit has so far lacked much fanfare.
In Cape Coast, a group of men at the palace strung up a large welcome sign in the courtyard in which it appeared that her first name had initially been misspelled. In Accra, the Ghanaian capital, the usual buzz associated with a visiting high-profile personality seemed to be missing.
Nana Amba Eyiaba, queen mother of Cape Coast, said Ghanaians had anticipated Mrs. Trump’s visit with a mixture of excitement and anxiety.
“There are so many countries in Africa, but she chose to come here,” the queen mother said. “It means there are some expectations from us. She will learn something about our culture and learn at first hand what Ghana is like.”
She also said, “I think her ‘Be Best’ project will benefit our children, which in turn will benefit our country.”
At a hospital in Accra, Mrs. Trump turned her focus on her biggest interest as first lady — children — giving out “Be Best”-themed blankets and teddy bears.
When she scooped up a chubby-cheeked baby boy from the crowd, photographs spread across the world. They were picked up by a White House eager for a bit of good news on a day when the administration was battling on numerous fronts. “Sweet moment,” declared Sarah Huckabee Sanders, the press secretary.
The first lady also met with a group of mothers who sat bouncing babies on their laps and breast-feeding. Mrs. Trump watched as a boy was weighed, and she smiled approvingly.
“Healthy boy,” Mrs. Trump told the boy’s mother.
It took the president a few hours to acknowledge that his wife was elsewhere in the world. When Mrs. Trump first touched down in Africa, her arrival seemed to be down the list of urgent topics for the White House.
There was Mr. Trump’s success at securing a new Nafta deal. And, of course, there was the battle over Brett Kavanaugh, his Supreme Court nominee.
At a rally in Mississippi on Tuesday in which he mocked the account of the woman who has accused Judge Kavanaugh of sexual assault, Mr. Trump took a brief moment to praise the job his wife was doing “hugging and kissing children” in Africa.
“You think that’s an easy job,” the president told his supporters, “That’s not an easy job. That’s a tough job. She is fantastic.”
Eugenia Tenkorang contributed reporting from Accra, Ghana.