President Jacob Zuma, giving South Africa's Olympic and Paralympic teams a final send-off on Thursday evening, urged the athletes to "win for South Africa. And win for Nelson Mandela, who is turning 94 years old on the 18th of July, who laid the foundation for a winning nation in 1994".
The London Olympic Games take place from 27 July to August 12, followed by the Paralympic Games from 29 August to 9 September.
South Africa is sending a team of 125 athletes across 16 sporting codes to the Olympics, and a team of 62 athletes across seven sporting codes to the Paralympics.
Speaking at a ceremony at the presidential guesthouse in Pretoria, Zuma said: "Each time we send our teams to compete abroad, we celebrate the role of sports in the struggle to bring about a free, non-racial, non-sexist, democratic South Africa.
"You should bear in mind that you are the representatives of a proud nation and a proud legacy of fighting for freedom, justice and human rights."
Zuma urged both teams to remember the values of "discipline, passion, commitment and dedication".
"More importantly, we want you to be clean - no drugs, no hectic partying, and no negative behaviour of any sort.
"In addition, support one another and take care of each other on foreign soil. We will be fully behind you, waving our beautiful rainbow flag at every available moment. Go out there, enjoy yourselves and win!
"We want at least 12 medals [at the Olympics], nothing less!" Zuma said, echoing the target laid down by South African Sports Confederation and Olympic Committee (Sascoc) president Gideon Sam.
In 1996 in Atlanta, Team South Africa scooped five medals, followed by another five at the 2000 Sydney Games. The medal tally improved marginally to six in 2004 in Athens, but fell below expectations in Beijing in 2008 when the team brought home only one medal.
Paralympic Team SA excelled by comparison, finishing sixth on the medals table while producing some of the biggest stars of the Beijing Paralympics in Natalie du Toit, Oscar Pistorius and Ernst van Dyk.