DAKAR, Senegal — After a visit to the market to buy a box of mangoes, some fish and a length of cloth, Binta Ba, a Senegalese woman, needed a way to get home.
So she looked around for her preferred means of transportation: a horse and buggy.
A ride was easy to find, with dozens of horse-drawn buggies lined up near the market, which was in Rufisque, a picturesque suburb of Dakar known for its colonial architecture.
She climbed aboard a buggy, whose driver then waited patiently for a third passenger to occupy his final seat. When his buggy was full, he took off at a trot, sometimes speeding up to a canter. The riders paid about 50 cents for a 10-minute ride, a fraction of what it would cost to take a taxi.
“Taking taxis is for rich people,” Ms. Ba said. “We prefer to support these people because they are from the community.”
Her view is a common one in Dakar, the capital of Senegal. But the city’s horse-drawn buggies, long a staple means of getting around, are under an emerging threat from motorized rickshaws.
Some city officials see the horse-drawn carts as a vestige of a poorer country, incompatible with the modern highways in a capital that is booming economically. The carts, in their view, are too slow, block traffic and cause accidents. The horses also foul the streets.
The move toward electric rickshaws got a big lift after a recent visit by President Macky Sall to India, where he saw motorized cabs widely in use and liked what he saw. He asked for, and was given, a gift from the state of 250 of them to try an experiment in clean-energy transportation in Dakar.
In the city, horse-drawn wooden carts weave through traffic jams alongside battered yellow-and-black taxis, tank-like SUV’s and flashy sports cars. Supporters say they are a useful adaptation to streets that are often buried in sand blown in from the nearby seashore, or for roads too narrow for trucks to get through.
The carts, or charrettes, as they are called in French, do the work of pickup trucks, hauling cement to construction sites and rice to grocery stores, and picking up household trash in places where garbage trucks cannot squeeze through.
The passenger version, the calèche, often carries women from the market to their homes, in neighborhoods where children play freely in the middle of the streets, knowing that cars would get stuck in the sand if they tried to get through.
They have long been banned from the city center, where the perimeter is marked by signs depicting horse-drawn carts with a slash through them.
Periodically, there is talk of barring them from more roads.
But in the suburb of Rufisque, many people defend them as part of Senegal’s cultural identity.
“The horse is a sacred animal in our cities,” said Sidy Mbaye, the secretary general of Rufisque, which has hundreds of working horse-drawn carts and no plans to ban them. “It accounts for why the president of the republic’s logo is a horse. Culturally, people love them.”
In Ngor, an affluent beachfront neighborhood of Dakar, there is an informal — local officials say clandestine — system of having the carts pick up household trash and take it to a nearby trash depot. Homeowners pay a modest monthly fee for this service, and avoid having to take the trash to the depot themselves.
When the police give the garbage carts tickets, the drivers put up their horses as collateral. After a day or two, the police, who are not equipped to take care of horses, are forced to release them.
But like Dakar more broadly, the neighborhood of Ngor is also considering a way to reduce reliance on the horse-drawn carts. There is a plan, still unfunded, to replace the carts with a fleet of municipal scooters, which would lug trash bins behind them. This approach would also provide employment for young people.
The uneasy coexistence between horse-drawn carts and development says a lot about Senegal’s ambivalence toward its rural past and its urban future.
For generations, horse-cart drivers have come from the Serer ethnic group, which still maintains strong ties to farming life.
They are people like Wague Diouf, who drives a horse cart on a garbage route in Ngor. His wife and five children live in his home village of Mbélakadiaw, in the Fatick region, and he returns there to see them once a month and to cultivate millet, peanuts and maize during the growing season. He grew up around horses and likes being able to enjoy a taste of the country life in the city.
In one indication of how precious his horse is to him, he calls the animal Toyota, and has fitted the horse with a hand-hammered harness ornament that looks something like the Toyota emblem. A previous horse was Bob Marley.
Mr. Diouf sees the handwriting on the wall.
“What is the future of these horses?” he mused. “Within a short time, this will be obsolete. We have to be willing to face it.”
He is trying to organize 500 of his fellow drivers in communities across the region to buy motorized rickshaws from China or India to replace the horse-drawn carts.
The shift is already underway in Diamniadio, an enormous planned development near the international airport, a showcase city connected to Dakar by a sleek highway and, coming soon, a high-speed rail line. The Senegalese government is moving many of its offices to Diamniadio from the congested downtown area.
There is talk, said Amadou Ndéné Ndoye, deputy head of mission at the Senegalese embassy in India, of deploying the Indian rickshaws to this city of the future, where they could ferry civil servants and others around the new government center.
As to whether horse-drawn carts might also find a place there, he did not hesitate. “No way,” Mr. Ndoye said. “It will be a modern city.”