The demonstrators opposed U.S. policy on Cuba, the war in Afghanistan, global warming and other issues. The rally in Pretoria was organized by trade unionists and members of the South African Communist Party.
The protesters want to raise public awareness and warn U.S. citizens about human rights violations committed by the Obama administration, which includes the non-closure of the Guantanamo Bay prison holding terrorism suspects, said campaign coordinator Mbuyiseni Ndlozi.
"Their administration's government is not welcome, and is being received with antagonism," Ndlozi said. "Therefore they'll have to rethink the standards by which they hold their government."
Protesters carried signs that read: "No, You Can't Obama," a message inspired by the "Yes We Can" campaign slogan adopted by the president during his first run for election.
Obama and his family were expected to arrive in South Africa later Friday as part of a tour of three African countries. Their three-day trip includes a visit to Cape Town's Robben Island, where former President Nelson Mandela spent 18 of his 27 years imprisoned by the previous white racist South African government.
Demonstrators staged a similar protest outside the Parliament building in Cape Town where Obama's record on human rights and trade relations in Africa were questioned.
"He's coming here to plunder Africa and South Africa," protester Abdurahman Khan said. "He's coming for the wealth and resources, for the gold and the diamond mines, while the majority of Africans and South Africans are suffering."
Protesters also plan to rally Saturday at the University of Johannesburg's Soweto campus, where Obama will address students and receive an honorary law degree, and on Sunday at the University of Cape Town.
Copyright 2013 The Associated Press.