A miner bikes home after a shift in the Lonmin mine, northwest of Johannesburg, last year. The city is divided on whether bike lanes are a frivolous outlay, benefiting affluent whites or a potentially enormous benefit for poor black communities. (Siphiwe Sibeko /Reuters)

The road that Martin Mathe uses to bike from his home in the black township of Diepsloot — a crowded jumble of shacks and small houses north of Johannesburg — to the wealthy suburb 10 miles away where he works as a gardener is little more than a frayed rope of concrete.

There is no designated bike lane, and the dirt shoulder is gnawing at the asphalt, leaving riders barely any room to avoid the hulking minibuses — South Africa’s preferred mode of public transit — that swerve in and out of traffic.

Mathe, who heads the Diepsloot Cycle Group, a collection of about 300 working-class bicycle commuters, has seen five of his friends killed on the road in the past decade and a half. So when he heard that Johannesburg’s new mayor had vowed in his inaugural address last month to halt construction of new bike lanes throughout the city, he was disappointed — and puzzled.

The mayor, a business tycoon named Herman Mashaba, said that the project’s cost couldn’t be justified, given the hundreds of thousands of city residents who “suffer in abject poverty and without even the most basic of services.”

But Mathe says that for him, biking has always been a way to dodge one of the major financial drains faced by the poor: transportation costs. “We ride bikes because there’s no money for anything else,” he said.

Practically speaking, bike lanes are far from Johannesburg’s most pressing transportation concern. Less than half of 1 percent of the population of 9 million uses a bike to go to work, and the local government spends about three times as much on council members’ travel as it had planned to spend on bulking up its bike lane infrastructure.

But symbolically, they loom large.

In a city deliberately sliced up by segregationist city planning, questions of where and how people are able to travel have deep, often painful resonance.

For opponents of bike lanes, the ubiquitous ribbons of green paint are daily reminders of what it means to live in a city that isn’t designed for everyone.

“Shame on white people for demanding bicycle lanes while blacks use bucket toilets,” said Julius Malema, leader of the populist-left opposition party, the Economic Freedom Fighters, in the run-up to South Africa’s local government elections in August. His words conjured an image of upper-middle-class leisure cyclists who zip through suburban neighborhoods on weekend mornings in a blur of brightly colored spandex.

They aren’t all white, but for Malema, in a country where fewer than 1 percent of white people live in poverty but nearly two-thirds of blacks do, the symbolism was clear. No government he was a part of, he pledged, would put bike lanes before safe housing, paved roads or other basic infrastructure the city’s poor so desperately need.

The designers and promoters of the bike lanes, however, see them far differently: as an attempt to use transportation policy to right history’s wrongs and stitch together a divided city.

Ironically, the primary beneficiaries they envisioned were the city’s poor — people such as Mathe, who bikes 20 miles a day, seven days a week, simply because he can’t afford anything else.

“This is not a political question,” said Ismail Vadi, who runs the provincial transportation department. “It’s about how we create sustainable, livable cities before it’s too late.”

But issues of livability, he says, are a relatively new conversation in South Africa, where for much of the past century the driving question in urban planning was how to keep people of different races as far apart as possible.

The result, in Johannesburg, is a city reeling from sprawl, where millions of blacks still live in the distant, poorly serviced peripheries once zoned for their residences. Most must leave these neighborhoods to find work in the affluent suburbs and commercial hubs, choking the roads and often deepening economic inequality. The city’s poorest residents spend more than 20 percent of their incomes simply to get to and from work, according to a Statistics South Africa survey.

That historical legacy has left planners and designers staring down a uniquely difficult question: How do you bring people together in a city whose very infrastructure is your enemy?

Bike lanes were meant to be part of the solution, says Rehana Moosajee, a former Johannesburg city council member who sits on the board of the Johannesburg Urban Cyclists Association. They began appearing here about three years ago, alongside bigger transportation projects including a bus rapid-transit system, a high-speed commuter train and new sidewalks.

There was just one problem with the new bike lanes: No one seemed to know what to do with them. Minibus taxis used them as turn lanes and cars parked in them, blotting the green strips from the map.

“You can’t just build infrastructure and then expect people will arrive,” Moosajee said.

In much of Johannesburg, people didn’t own bikes or even know how to ride them. City planners thought cycling would make the commutes of the poor easier, but it often seemed they had forgotten to tell them that, Moosajee said.

Quickly, “the perception became that cycling here just didn’t and couldn’t work,” said Njogu Morgan, a PhD student at the University of the Witwatersrand in Johannesburg who studies the city’s cycling culture.

That, in turn, made the lanes an easy political target.

Before the recent local elections, Malema, the opposition leader, made the little-used bike lanes a regular part of his rhetoric, calling them a symbol of the decadence and out-of-touch thinking of the incumbent African National Congress government. After his party helped usher Mashaba to victory in August as part of a coalition government, the new mayor returned the favor by agreeing to one of the party’s most popular campaign pledges.

“When every road in Johannesburg is tarred, maybe then we will look at bicycle lanes again,” he said.

Mathe didn’t feel bitter about the mayor’s decision, despite his bafflement. He had been making do without a bike lane on his commute for nearly 20 years, he said, and he could wait a little longer.

On a recent morning in the western part of the city, Dan Khumalo, 34, who is black, carefully steered a large cart into one of the green bike lanes. It was loaded with chipped Coke bottles, crushed baked-bean cans and stacks of damp paper — the spoils of a morning spent collecting recyclables from trash cans in the area. He would pull his cart about two miles to a recycling plant, where he expected to exchange the day’s haul for $10 to $15.

Along about half his route were city-built bike lanes, and he had no reservations, political or otherwise, about their presence.

“I like them a lot,” he said. “They’re 100 percent.”