The rainy season here has been starting later in recent years, and the downpours are fewer. As drought becomes a new way of life, the baobab in many communities is where people gather to pray for rain.

In Diock, a village about three hours outside the capital, the rainy season should be in full swing by now, but by early August it had rained only four times. The millet plants in the surrounding fields were only ankle high.

“We watch on television what is going on in Europe and in the world,” said Mamadou Diop, the village chief. “We know what’s coming.”

To fight climate change, residents are using fewer gas-gulping machines and not cutting down smaller trees for firewood.

But harvests have been so poor that many of the village’s 600 residents have abandoned farming and moved to the city, where they find work as teachers or soldiers.

“We’re trying to reduce greenhouse gases,” Mr. Diop said, “but it’s as if we are powerless.”

In towns and villages that dot the countryside, each community has its own tradition entwined with its local baobab.

In Diock, a new bride and groom circle the baobab seven times after they are married. On Fadiouth, an island on the southwest coast made entirely of seashells, funeral processions pause at the base of the village baobab, before carrying on to a Catholic shrine and the cemetery.