Many South Africans dislike what they see as US unilateralism. Mrs. Obama's visit is an attempt to remind South Africans of shared history and common goals.
In the past, pirates have been very reluctant to harm captives, but on Tuesday, four Americans taken hostage by Somali pirates were killed.
A US judge sentenced Somali pirate Abduwali Abdukhadir Muse to nearly 34 years in prison, citing a need to deter others. But the problem is getting to those who finance piracy operations.
The USS Nicholas returned fire on Somali pirates near the Seychelles, sinking an attacking boat, confiscating the mother ship, and apprehending five pirates. The US Navy has stepped up patrols in the Indian Ocean.
His week-long visit will focus on humanitarian improvements.