Melania Trump has prompted consternation, some anger and much derision by choosing a pith helmet – a symbol of colonial rule across Africa – as headwear for a brief safari in Kenya.

On the penultimate day of her tour of the continent – her first solo trip overseas – the first lady visited an orphanage in Nairobi before heading to a national park near the city.

Dressed in riding pants, boots and a spotless white pith helmet, the former model climbed into an open-air vehicle for the safari, taking photos on her iPhone of zebras, giraffes, impalas, rhinos and hippos.

She also stopped at a site where 105 tons of ivory was burned as part of an effort to discourage the trade.

But it was the headgear that attracted most attention. Pith helmets – so-called because they are made of the material sholapith – were worn by European explorers and imperial administrators in Africa, parts of Asia and the Middle East in the 19th century before being adopted by military officers, rapidly becoming a symbol of status – and oppression.

Melania Trump talks with Park Manager Nelly Palmeris at the Nairobi National Park Photograph: Saul Loeb/AFP/Getty Images

Soldiers, guides and wildlife specialists replaced the pith helmet long ago with more practical and less controversial headgear, but they are still in ceremonial use in a handful of countries – and by tourists in Africa who have limited experience of local conditions and sensibilities.

“That pith helmet you have carried was used by colonialists during the dark days. Doesn’t sit well with us Africans. Who advised you?” wrote Pauleen Mwalo, of Nairobi, on Twitter.

Others noted the first lady’s resemblance to Meryl Streep in the Hollywood film of Out of Africa, the film adaptation of the book by Karen Blixen, a Danish baroness and settler in Kenya.

The first lady’s trip has been viewed by some as an attempt to repair damage done by a series of apparently disparaging comments made by her husband.

Last year Donald Trump appeared to refer to a non-existent country called “Nambia” in a speech to ambassadors from the continent. In January he was reported to have described several African countries as “shitholes” during a heated discussion about immigration. In September he announced that he had told Mike Pompeo, the secretary of state, to investigate “large-scale killing” of farmers in South Africa. The comment prompted outrage and a blunt rebuttal from the South African president Cyril Ramaphosa.

South Africa was not on the first lady’s itinerary. The tour – to Ghana, Malawi, Kenya and Egypt – has focused on child welfare, education, tourism and conservation, aides have said.

Her husband tweeted earlier this week: “Our country’s great First Lady, Melania, is doing really well in Africa. The people love her, and she loves them! It is a beautiful thing to see.”