The Dutch East India Company established Cape Town as a halfway port en route to the East Indies. The imperialist Dutch had already colonized the East Indies, known today as Malaysia and Indonesia. The Dutch banished and exiled any who revolted against occupation of the East Indies to the Cape.
The Dutch also captured Malays (including royalty and scholars) and sold them as slaves in the slave markets. Most of these revolutionaries and slaves were practising Muslims who established Islam in the Cape. The religion then spread to the rest of what is now South Africa. Other Muslims arrived in South Africa from India and elsewhere in the world.
Throughout the 18th Century, Islam continuously grew. This was not unnoticed by the Dutch colonizers. Consequently, the practice, propagation and teaching of Islam were outlawed and punishable by death. An added incentive for their ignoble intentions was that any slave who converted to Christianity was freed from slavery. Therefore, the early Cape Muslims of the Cape Colony – in honour of the dedication of their forefathers to Islam as the Salvation of Man – made every effort to preserve their religion, despite the opposition. The sighting of the Hilaal (crescent moon) and the Athaan continued in those early years despite prejudice and discrimination against Islam, even in secret when Islam was banned in the Cape.