“The writer counted, in the space of only four minutes, 93 native cyclists riding past the Astra theatre,” wrote a journalist for the Star newspaper in July 1940. Standing almost 80 years later on the same corner of Louis Botha Avenue at the same time and day of the week – 6.30pm on a Monday – it is hard to imagine. The theatre is long gone and not a single cyclist is to be seen on the car-choked thoroughfare.

What happened to Johannesburg’s once vibrant commuter cycling culture? The dominance of the automobile marginalised the bicycle in many cities around the world through the 40s, 50s, 60s and 70s but that process was accelerated in South Africa by apartheid. When policies of spatial segregation forcibly moved black people to faraway townships at the periphery of the city, the distance between work and home increased dramatically and cycling collapsed as an everyday practice.

Twenty-five years after apartheid’s fall, those spatial and economic inequalities remain entrenched in the city and continue to shape how people get around.

It may be said of the Johannesburg child that he learns to cycle before he can walk 1903 newspaper columnist

The story of Johannesburg starts in 1886 with the discovery of gold. As prospectors from around the world flooded in to seek their fortunes, what had once been farmland was transformed in the space of a few years into a thriving city.

Members of Johannesburg Amateur Bicycling Club, a white leisure cycling group, in the 1890s

The economic boom meant residents could afford new consumer goods that conveyed modernity – the bicycle among them. By 1900, Johannesburg was known as a true cycling city. Writing in 1903, a newspaper columnist, wrote: “There are few cities in South Africa or in any other part of the world where a large[r] number of cyclists are to be found as in Johannesburg. Nearly every third inhabitant rides a bicycle, and it may be said of the Johannesburg child that he learns to cycle before he can walk.”

Bicycles were status symbols – fashionable consumer goods for the wealthy to tour around on and use for sport. White cycling associations fought for cyclists’ rights on the streets and the colonial authorities devised policy incentives to boost their use. The city council paid its civil servants a subsidy if they rode to work, and the central railway station planned a large cycle parking facility. Even the exclusive Rand Club installed a bike rack.

Alexander Township residents ride bicycles in 1957 as part of a boycott of bus services in protest at high fares

The freedom the bicycle gave black people wasn’t always welcome though. Using allegations that “natives” stole bicycles and rode them dangerously, the Rand Pioneers, representing the mining elite, campaigned in 1905 for a citywide law requiring black cyclists to wear a badge on their left arm to indicate they had council authorisation. It was soon retracted by the British colonial government.

The arrival of the motor car changed everything. For white Johannesburgers, car ownership by black people was necessarily a social threat. One car licensing officer argued in 1928: “As soon as a native sits in a car, he thinks he has the same rights and privileges, and that he must be treated as a white man. The whole road belongs to him, and everyone else must either stop, or hop out of his way, and if you don’t, you must either risk either being run over or covered up in the dust of his car.”

Car ownership among black South Africans was negligible. The prohibitive costs and the lack of public transport meant cycling grew fast among black working-class South Africans. Bicycles became a low-status form of transport for the poor and oppressed.

Left: two men pose proudly with their bicycles in 1922. Right: 1890s Johannesburg

The editor of one newspaper motoring section wrote disparagingly of “the tired native cyclists usurp[ing] the roadway to the discomfort of other traffic” near Alexandra Township. When in 1935 a cycle lane was painted on Louis Botha Avenue, the city authorities touted it as a safety solution, but its true purpose was to get black cyclists from Alex out of the way of white motorists.

Even though the white middle-class had already abandoned the bike for the car, the Johannesburg of the 1930s was a true cycling city as miners, carpenters, deliverymen and other workers took to two wheels to get around.

“No account of the development of transport in Johannesburg would be complete without mention of the tremendous part played by the pedal cycle, of which many thousands were sold all over Johannesburg and the Reef and, in fact, they did the work then which is now being done by the motor car,” observed one city resident in 1936.

Workers from a white working-class neighbourhood cycle towards the then city centre

People cycled, though, because travel distances to work were short. After 1948, when apartheid policies of spatial segregation meant black workers were violently evicted to distant areas – in some cases more than 20 miles from the centre – the bicycle in Johannesburg was dead.

Postwar infrastructure investment enhanced motoring at the expense of alternatives, and Johannesburg undertook significant works: road widening, highway construction, underpasses, overpasses, bridges and off-street parking facilities. Roads became understood as corridors for moving motor vehicles.

While cycling also lost status across the western world from the 1950s, in South Africa a combination of economic growth, high levels of car ownership among white people and deep social divisions meant this process played out earlier, more rapidly and more intensely.

Left: white children’s bicycles at an airshow. Right: Alexandra Township residents discuss the 1957 bus boycott

At the end of apartheid in 1994, utility cycling was almost entirely absent from Johannesburg streets. As a city with multiple centres, cyclists are more or less never seen on traditional transport corridors to the CBD such as Louis Botha Avenue.

Can Johannesburg become a cycling city once again? Although the city’s mayor, Herman Mashaba, halted all cycle infrastructure investment in 2016, work had already begun on a new cycling and walking bridge that straddles a motorway built in the 1960s and 70s for the then mainly white motoring population.

A walk to freedom: can Joburg's bridges heal the urban scars of apartheid? Read more

If the highway it spans epitomises Johannesburg’s lost century of segregation and motorisation, then the city’s future might be seen in the growing streams of walkers, joggers, cyclists and traders who make their way across the bridge every day with ease, high above the gridlock. There is hope.

Njogu Morgan is a postdoctoral research fellow in the history workshop at the University of the Witwatersrand

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter