Over many decades of minority rule, South Africa's white authorities wielded every kind of law and policy they could think of to maintain a segregated society that kept blacks down. Yet one sport confounded every strategy – football. When Bafana Bafana, the mostly black national squad, takes the field Friday at the World Cup, that moment will culminate the dramatic evolution of South African football along a path that foretold the demise of apartheid. Even in football's early phases, long before apartheid laws formalized racial segregation in 1948, it was a rare and welcome means for blacks in impoverished and unauthorized urban settlements to build their communities, develop their own heroes and break down ethnic barriers. By the 1960s, the top white teams were maneuvering to play black teams – knowing that was the true test of their prowess. In 1977, the all-white professional league shut down, with many of its players shifting to a black-dominated league that became a showcase for black players, coaches and owners. “Soccer was a black-run sport, by and large – it was ahead of the curve,” said Peter Alegi, a Michigan State University history professor who writes frequently about African football. Football in South Africa dates back at least to the 1860s, when white soldiers and civil servants played matches in Cape Town and Port Elizabeth. By 1880, black and Indian clubs were active. The whites-only South African Football Association was formed in 1892, while black leagues were taking root by the 1920s. In 1935, the first official interracial tournament was launched – with black, mixed-race and Indian teams. Leepile Taunyane, an 81-year-old former educator who is life president of South Africa's Premier Soccer League, said those early interracial matches had historic repercussions. The African National Congress – which went on to become the main force in challenging apartheid – got involved in football as a match sponsor. One of its early presidents, Albert Luthuli, helped established an interracial football board in Natal province. Later, many of ANC leader Nelson Mandela's fellow political prisoners played football in their dusty prison yard on Robben Island – a vital means of keeping up their spirits and camaraderie. Mandela was freed in 1990 and elected president in 1994. In 1995, he donned the Springbok jersey of the nearly all-white national rugby team when it won the World Cup in Johannesburg – a remarkable gesture of unity given that rugby is the sport most cherished by the white Afrikaners who had created and maintained apartheid. While in power, the Afrikaner establishment never fully embraced football. But other South African whites had the sport in their blood – and many were open to interracial competition either as players or fans. Even in the sport's early days, Alegi said, there were whites who helped black teams get organized and find a place to play at a time when blacks were legally prohibited from staying in most urban areas. “In the process, it started building the foundation for the integration that would come later on,” Alegi said. Some of the great, predominantly black teams now playing in the Premier Soccer League have remarkable histories dating back to their humble pre-apartheid origins. The Orlando Pirates were founded in 1937, the Moroka Swallows in 1947. A group of breakaway Orlando Pirates formed the Kaizer Chiefs in 1970, and those two clubs, each drawing fans from the huge black township of Soweto, have developed one of the fiercest rivalries in the sport. By the late 1970s, as these teams drew ever bigger followings, some major South African corporations began arranging sponsorships. “Big business sees the writing on the wall – that there's money to be made from the emerging black middle class,” said Chris Bolsmann, a South African-born sociologist who now teaches in Britain and has studied the evolution of football in his homeland. Bolsmann went to an all-white high school in Pretoria where he was forced to play rugby, yet became a top-level youth footballer in the mid-1980s and says the matches he played as a teenager were his first interaction with black peers. The 1970s and 1980s produced an array of brilliant black players – including Ace Ntsoelengoe of Kaizer Chiefs and Jomo Sono of Orlando Pirates. They both played in the North American Soccer League as well as in South Africa. Tony Karon, a South African-born journalist with Time.com, wrote an essay after Ntsoelengoe's death in 2006, recalling how the great black stars of the apartheid era had become heroes to young South African fans of all races. Because of the international sports boycott imposed on South Africa during apartheid, players like Ntsoelengoe never got to represent their country internationally. Yet Karon argues that they played a historic role nonetheless. FIFA admitted South Africa as a member in 1952 but suspended it in 1961 because of its segregation policies. The suspension was upgraded to outright expulsion in 1976, after several hundred blacks were killed in nationwide rioting sparked by the Soweto uprising. Reinstatement didn't come until 1992, when apartheid laws were dissolving and South Africa's long-divided football associations had united as the nonracial South African Football Association. “That was a pretty powerful symbol of black institution building,” Alegi said. “At time when there was a heck of a lot of uncertainty, to see that this black-run institution had managed to do away with old racial divisions and then get admitted back into FIFA – symbolically that was very significant.” In July 1992, South Africa hosted its first official international match with a team representing the entire nation – and beat Cameroon 1-0. Bolsmann, 20 at the time, watched that game. “For the first time I identified with a South African team that was made up of everybody,” he said. “It was our team.” Twelve years later came the ultimate honor – FIFA choosing South Africa to host 2010 World Cup. Mandela was there for the announcement in 2004, and couldn't hold back tears. Danny Jordaan, head of the South African organizing committee and a veteran of past struggles to topple football's racial barriers, also was on hand. “The dream of a nation has come true today,” Jordaan said at the time. “Some South Africans may not have food or a job but they now have hope.”