Law enforcement in South Africa
Law enforcement in South Africa is primarily the responsibility of the South African Police Service (SAPS), South Africa's national police force. SAPS is responsible for investigating crime and security throughout the country. The "national police force is crucial for the safety of South Africa's citizens" and was established in accordance with the provisions of Section 205 of the Constitution of South Africa. History

European Colonization (1652-1910) 
The mid-seventeenth century marked the beginning of European interest in the Western Cape, in what is currently South Africa. In its earliest stages, the colony was run by the Dutch East India Company. During their occupation, and well into British colonization of the area, there were a variety of policing units throughout the various areas of the vast colony. Cape of Good Hope 
From 1652 until 1840, the primary law enforcement agency in Cape Town was the Fiscal's law enforcement officers who maintained law and order in the area. They worked in conjunction with the Night Watch (1686-1840), which was responsible for the nighttime surveillance of Cape Town. These two units were merged in 1825 into the Police Office, which was later replaced by the Town Police (also known as the Cape Peninsula Urban Police) in 1840. In addition to urban policing, there were other units that were in charge of the rural areas of the Cape. From 1686 until 1848, the Magistrate's Law Enforcement Officers were responsible for policing the rural areas of the Cape; each district had a magistrate, and each magistrate had its own officers. The Rural Police (1848-1913) came to replace the Magistrate's Law Enforcement Officers. Under this agency, each district had its own chief constable and a small force that were commanded by a resident magistrate. In 1855, the Cape Colonial Forces (CCF) were established as the official paramilitary organization of the Cape. They were formed after the British took over the Cape Colony from the Dutch and granted the colony representative government. The organization was made up of a variety of units that patrolled and operated in various areas of the Cape. The organization was made up of the Frontier Armed and Mounted Police, the Burgher Force, and the Volunteer Force. The Burgher and Volunteer forces were district-based militias that could be mobilized in their respective areas; the Volunteer Force was made up of privately organized and financed units that provided services at the government's disposal. The organization operated until 1912, when it was disbanded and replaced by the Union Defence Forces. The Cape of Good Hope also had units policing borders and points of trade. The Frontier Armed and Mounted Police (1855-1878) and the Northern Border Police (1868-1873 and 1879-1884) were forces responsible for maintaining order along the borders of the colony and to protect the colony from neighboring indigenous kingdoms. The Cape Government Railways police were hired by the government to maintain order on the railways. The Dock and Harbour Police (1860-1913) were established with the intent to enforce the law in the Table Bay harbor. Union of South Africa (1910-1961) 
After the establishment of the Union of South Africa, the union inherited the Cape Colonial Forces, but eventually replaced that agency with the Union Defence Forces in 1912 with the passing of the Defence Act (No. 13 of 1912). Because this force was primarily used as a standing army, the Union required the formation of a formal police agency. In 1913, the South African Police (SAP) was created by Proclamation 18 to function as the national police force and law enforcement agency in South Africa. SAP was an amalgamation of the four police forces of the colonies (Cape, Natal, Orange River, Transvaal). It originally only policed urban areas and cities, while the South African Mounted Rifleman (a part of the Union Defence Force) policed the rural areas. After the first World War, SAP took over the role of the Riflemen—who were later disbanded—and had the task of policing the vast territory that made up the union. SAP also had the task of policing South West Africa, which was under the South African government. Relevant Laws to the Operation of SAP in the Union 
 Criminal Procedure and Evidence Act (No. 31): Established that the Union's Criminal Justice system would be modelled on the criminal laws of the English system (accusatory in nature). Native Land Act 1913: The act aimed to regulate the acquisition of land, stating that natives were not allowed to purchase lands from whites, and vice versa. SAP ensured that certain land transactions were not occurring and followed the law. Immorality Act of 1927: The act prohibited sexual relations between black and white people. Apartheid (1948-1994) 
With the rise and subsequent election of the conservative National Party in 1948, the new government began passing legislation that allowed for a closer relationship between the police and military. There were moves to militarize the police force and SAP became heavily armed, most notably for its interactions with crowds that were deemed unruly and hostile. Police Act (No. 7) of 1958 outlined the functions of the police. Most importantly, Section 5 (now repealed) of the act read as follows:"The functions of the South African Police shall be inter alia: (a) the preservation of the internal security of the Republic; (b) the maintenance of law and order; (c) the investigation of any offence or alleged offence; and (d) the prevention of crime." -- Police Act (No. 7), Section 5This Act broadened the function of the SAP beyond the standard police operations of maintaining law and order, investigating and preventing crimes. The SAP had unprecedented power to combat counterinsurgency and opposition to the Apartheid government. The Police Amendment Act (No. 70) of 1965 introduced search and seizure zones. This empowered police with the ability to search without warrant any person, receptacle, vehicle, aircraft, or premise within one mile of any national border as well as the ability to seize anything found during the search. These zones were gradually expanded in 1979 and 1983; ultimately, the SAP were permitted to conduct a search and seizure within South Africa without restriction. These broad police powers created a very powerful and volatile force in the Apartheid regime. The SAP were taking many liberties in their interactions with the population of South Africa and instances of abuse and human rights violations were abundant. In 1977, the government passed the Indemnity Act (No. 13) to retroactively protect the government and the SAP from civil and criminal litigation due to acts committed between June 16, 1976, and March 16, 1977. The act placed police and government action during this period beyond public and legal scrutiny and prevented victims from seeking criminal or civil claims. Homeland Law Enforcement 
The Black Local Authorities Act of 1982 provided the establishment of local government structures in the Bantustans, similar to those present in white areas; the Apartheid government claimed that this would create a sense of autonomy in black communities and would allow them some local township power. However, the formation of these separate living areas for blacks systematically segregated black people from white communities as well as kept Black Africans from acquiring full citizenship. Included in this act was the creation of Homeland Police. While the police presence in the homelands were legally independent of the SAP, they were still very much an extension of the national organization in action. The SAP presence was mostly focused on a counterinsurgency approach that aimed to diminish the amount of retaliation and revolt in the homelands. In an effort to aid this counterinsurgency, homeland security forces were established by Proclamations R400 and R413. These proclamations stipulated that a local department of justice and security force would be established in the Transkei and they would be under the jurisdiction of SAP, with equipment, training, and modes of operation being decided by SAP forces. In the Transkei, the 543 members (in 1975) were commanded by five white officers, reflecting a redundancy in policing, as the homelands were subject to an overlap of policing and security forces. Very frequently, security forces in the homelands played “kingmaker” and assumed the legislative and governing roles. Homeland police were usually used to support particular regimes; the judiciary was weakened, focusing the police functions in upholding the interests of ruling elites, and not in the law. Other Relevant Laws to the Operation of SAP during Apartheid 
 Group Areas Act, 1950: Racial groups were assigned different residential and business sections in urban areas. People usually had one year to relocate once notified that they were living in the wrong section; once that year was up, their occupation of their homes and land became a criminal act, punishable by a fine and two years' imprisonment. Prevention of Illegal Squatting Act, 1951: Allowed for the forcible removal of squatting communities, eviction and destruction of homes of squatters by landowners, local authorities and government officials. Suppression of Communism Act, 1950: Labeled communism as any act that aimed at change—economic, social, political or industrial change—by promotion of disturbance or disorder or the encouragement of hostilities between Europeans and non-Europeans. Bantu Authorities Act, 1951: Established different homelands (bantustans) for the various indigenous black South Africans, as well as "independent" government structures within those homelands. Pass Laws Act: Pass system used to maintain racial segregation and manage urbanization and allocate migrant labor. It required black people to use passes when moving outside of their homelands or designated areas. Public Safety Act: The act empowered government to declare states of emergency and increased penalties for protesting against or supporting the repeal of a law, mostly in response to the civil disobedience demonstrated by the ANC. Allowed for a declaration of a state of emergency and whatever laws issued during this period could be made retrospective for four days to cover any emergency action by police. During this state of emergency, the minister of law and order, the commissioner of SAP, a magistrate or commissioned officer could detain any person for reasons of public safety, providing for further detention without trial for any dissent. Unlawful Organization Act: Made any organization that was anti-apartheid unlawful. Was later replaced by the Internal Security Act. General Amendment Act: The act allowed SAP officers to detain without a warrant a person that was suspected of a politically motivated crime for up to 90 days without access to a lawyer. Usually, suspects were detained multiple times in succession. It also included the Sobukwe Clause, which allowed for the detaining for up to 12 months of individuals who had already been convicted of a political offense. It further defined political crimes under apartheid, including the receiving of training that could further the objectives of communism or advocate for change in South Africa by violent means and/or foreign intervention—a capital crime. It was expanded in 1964 which allowed the minister of justice to extend the Sobukwe Clause. It was repealed by the Internal Security Act of 1982—which still gave the government similar powers of detention. Terrorism Act, 1967: Section 6 of the Act allowed for detention of someone who was suspected of terrorism or being involved in terrorism (defined as anything that might endanger the maintenance of law and order), for a 60-day period that could be renewed, without trial on the authority of a senior police officer. In addition, there was no requirement to notify who was being held under the act, resulting in many disappearances. The Act also implemented the South African Bureau for State Security, a homeland security/secret police organization. Prohibition of Political Interference Act, 1968:  The Act sought to prevent racial groups from collaborating with one another for political purposes. The Liberal Party of South Africa was especially targeted, which was made up of South Africans of different races who were collectively against the racially divisive policies of South Africa’s apartheid regime. Aliens Control Act, 1973: Exempted the racial group of Indians from needing to obtain permits to travel between provinces. However, Indians were not allowed to reside in the Orange Free State and parts of Natal. Indemnity Act (No. 13) 1977: Was an act that absolved and protected the government from any repercussions following the Sharpeville massacre and other violent events. It prevented the courts from hearing criminal charges brought against the government and its employees—including police officers. It protected actions, orders given and information provided that was conducted under “good faith” to protect public order, essential services, life or property. Internal Security Act, 1982: Replaced parts of the Suppression of Communism Act, Riotous Assemblies Act, Unlawful Organizations Act, and the Terrorism Act. Gave government broad powers to ban and restrict organizations, publications, people and public gatherings and to detain people without trial. South African Police Service (1994-present) 
The South African Police Service (SAPS) is the current national police force of South Africa, formed after the end of Apartheid and during Transformation in the late 1990s. The SAPS came to replace the Apartheid national police force, the South African Police in 1994. The Constitution of South Africa states that the SAPS' responsibilities are to prevent, combat and investigate crime; maintain and protect the public, their property and the overall security and safety of the Republic; uphold and enforce the law; and maintain. Furthermore, the South African Police Service Act (No. 68) of 1995 states that the SAPS is "to provide for the establishment, organisation, regulation and control of the South African Police Service; and to provide for matters in connection therewith." Despite the vision of a new South Africa with a security force that upholds the ideals of serving and protecting the entire public, unlike the previous law enforcement agencies, there have been numerous accounts and accusations of police brutality. Municipal Police Units (1994-present) 
Metropolitan municipalities also maintain their own municipal police units, which are tasked mainly with traffic policing and the enforcement of municipal bylaws. Municipal Police have fewer powers than the South African Police Service, and do not investigate major crimes. Special Units (1994-present) 

In addition to general policing units, some municipalities maintain their own specialized units that focus on particular issues. The Anti-Land Invasion Unit was established in 2009 by the City of Cape Town to prevent the illegal occupation of land and the erection of unauthorized dwellings throughout the city. It was reported that the unit demolished over 300 shacks in the past year. 