Suleiman Chubado is not entirely clear what caused the price of fertilizer to more than double over the past year, but he is bitterly aware of the consequences. At his farm in northeastern Nigeria, he can no longer afford enough fertilizer, so his corn is stunted and pale, the scraggly plants bending toward the powdery earth.

Inside his mud house, he has grown accustomed to explaining to his two young children and pregnant wife why they must make do with two meals a day — and sometimes only one — even as hunger gnaws.

As he and his neighbors commiserate over the calamity unfolding across much of Africa, they exchange theories on one source of trouble: Russia’s war on Ukraine, which disrupted shipments of key ingredients for fertilizer.

“We are in two different worlds, separated by airplanes and oceans,” Mr. Chubado said. “How can it be affecting us here?”

That question is reverberating in many lower-income countries. Farmers are grappling with shocks that made fertilizer scarce and unaffordable, diminishing harvests, raising food prices and spreading hunger.

The war in Ukraine reduced the region’s grain exports and sent the price of staples like wheat soaring from Egypt to Indonesia. The world’s food supply is also menaced by the ravages of climate change — heat waves, drought, floods.

Now, scarce and expensive fertilizer is combining with these other forces to threaten livelihoods.

The breakdown in fertilizer production challenges the orthodoxy that has dominated international trade for decades. Prominent economists have promoted globalization as insurance against upheaval. When factories in one place cannot produce goods, they can be summoned from somewhere else. Yet as farmers across Africa and parts of Asia contend with fertilizer shortages, their anguish attests to a less celebrated aspect of the interlinked economy: Shared dependence on vital products from dominant suppliers yields widespread danger when shocks emerge.

The crisis started with the Covid-19 pandemic, which increased the cost of transporting fertilizer ingredients. Then came the war. Finally, over the last 18 months, the U.S. Federal Reserve aggressively lifted interest rates to choke off domestic inflation. That has lifted the value of the American dollar against many currencies. Because fertilizer components are priced in dollars, they have become vastly more expensive in countries like Nigeria.

Since February 2022, the price of fertilizer has more than doubled in Nigeria and 13 other countries, according to a survey by ActionAid, an international relief group. Concern about food insecurity has been “alarmingly high” in much of West and Central Africa, according to a World Bank bulletin.

In Nigeria alone, Africa’s most populous country, nearly 90 million people — roughly two-fifths of the nation — suffer from “insufficient food consumption,” according to data from the World Food Program.

In conversations with three dozen people engaged in growing crops, trading food and distributing fertilizer in northeastern Nigeria, a sense of bewilderment is palpable alongside desperation.

Farmers are shifting from growing staples like rice and corn to less valuable crops like soybeans and peanuts, which require less fertilizer. Thieves are stealing harvests. Wives are leaving husbands and returning to families with greater access to food. Parents are pulling children out of school for a lack of tuition money. Upward mobility has yielded to the imperative to hang on.

Mr. Chubado, 27, is eager to send his children to university. He typically uses some of his crop to feed his family while selling the rest to raise cash. Yet with no extra crop to sell this year, he recently moved his 10-year-old son, Abubakar, from a private school where classes are no larger than 20 to a government school where 70 children crowd into classrooms.

He cannot afford to buy the usual three school uniforms, so Abubakar must make do with one. Some days, his son complains that his uniform is too dirty and refuses to go to school.

Faced with extraordinary prices for inorganic or commercial fertilizers, some farmers are shifting to organic varieties, including animal manure. Longer term, that is better for soil, food quality and public health, experts say.

But it can take years for crops grown with organic fertilizers to approach the yields achieved through the use of commercial varieties. In Nigeria, home to more than 220 million people, the highest priority is the immediate pursuit of additional food. At least for now, inorganic fertilizers remain a crucial means of adding vital nutrients like nitrogen and potassium to soils.

Inorganic fertilizer is a global enterprise, one dominated by producers in the United States, China, India, Russia, Canada and Morocco. Nigeria has several fertilizer factories that produce varieties of nitrogen fertilizer, but they export nearly everything to South America. As a result, the country is vulnerable to any break in the global supply chain.

The pandemic delivered a colossal blow.

When making and blending fertilizer, Nigeria imports phosphates mined in Morocco, shipping them to the port of Lagos. Over the first two months of the pandemic, as commercial activity froze, shipping companies reduced their ports of call in sub-Saharan Africa by roughly one-fifth, according to the United Nations Conference on Trade and Development.

Then, as regular shipping schedules resumed, Lagos was overwhelmed by a cargo backlog. Seeking easier passage, fertilizer manufacturers diverted shipments to Port Harcourt, about 370 miles down the coast. But rampant piracy in the area entailed higher costs for insurance and freight.

In March 2021, a massive container ship ran aground in the Suez Canal, closing that artery of trade and sending global shipping prices skyward. The cost of phosphates from Morocco delivered to Nigeria grew to more than $1,000 per ton, from $300 to $400.

“You had all those problems compounding supply,” said Gideon Negedu, executive secretary of the Fertilizer Producers and Suppliers Association of Nigeria.

Then, just as supply was recovering, Russia invaded Ukraine.

For fertilizer producers, the most immediate effect of the war was its impact on energy prices.

Nitrogen fertilizers are made through a chemical process that consumes energy, typically natural gas. As the United States, Europe and other governments enforced sanctions against Russia — a major gas producer — the price rose.

The war also limited access to potash, an important source of potassium. Mining potash is a major industry in Belarus, a Russian ally. Even before the war in Ukraine, Belarus confronted international restrictions on its sales. Russia is another major supplier.

American and European sanctions on Russia and Belarus include exemptions intended to allow trade in agricultural commodities. But much of the potash coming out of Belarus — a landlocked country — has traditionally been shipped from Lithuania, which has barred rail access since last year.

Fertilizer manufacturers could not simply forgo phosphates and make products with the other key nutrients, nitrogen and potassium. Many crops require all three.

Mr. Negedu’s trade association represents 80 fertilizer blending plants and 500 large distributors around Nigeria. In pursuit of potash, the association pivoted to the Canadian province of Saskatchewan, contending with stiff competition from much larger consumers of fertilizer from the United States and India, along with higher shipping rates.

For much of last year, a ton of phosphates moved from Canada to Nigeria ran $1,350 — a roughly fivefold increase over the price before 2020.

In the dusty city of Gombe, Kasim Abubakar, 28, a fertilizer merchant, contemplated his diminishing stocks with a deepening sense of dread.

It was July 2022, five months after Russia’s invasion of Ukraine and the beginning of the peak season for farmers applying fertilizer. He placed an order for 700 bags of urea — a form of nitrogen — with a Nigerian manufacturer.

Not until October, four months after the peak season, did he finally receive his shipment.

This year, Mr. Abubakar ordered 2,100 bags of NPK, a mixture of the three primary nutrients, from an agribusiness supplier in Lagos. He prepaid the full balance — 48 million naira, or about $61,000.

Several weeks later, a sales manager informed him that production had been halted at the factory. Mr. Abubakar never received his shipment, while waiting four months for a refund.

With limited inventory, his sales have dropped by half. In the Gombe area, a shortage of fertilizer worsened.

For farmers with enough cash or credit to buy fertilizer, like Mohammed Sambo, 77, this was an opportunity. His 370-acre farm beyond Gombe is home to his four wives, seven children and 40 grandchildren. They live in mud houses that lack electricity and plumbing.

Last year, with fertilizer prices climbing, Mr. Sambo and his family cultivated only 74 acres. This year, fertilizer was even more expensive. Still, they nearly doubled their planting and increased their use of fertilizer, divining that — with other farmers retreating — the white beans, corn and millet they grew would command a premium.

They borrowed the money from a local seed company that provides technical advice along with fertilizer through a program forged by Mercy Corps, the international aid organization. The seed company waits for harvest until it collects its repayment.

On a recent afternoon, Mr. Sambo’s family proudly displayed its towering corn plants. One of his sons pulled back the silk on a promising ear to reveal plump white kernels.

The family plans to fold its profits into expanding its acreage next year, eventually installing solar cells to generate electricity.

But those who cannot afford fertilizer are triply cursed. They lack adequate crops to feed their families. They have nothing to sell to raise cash. Yet they must buy food at wildly inflated prices.

Adamu Ibrahim, 28, a father of four, had hoped to sell some of his corn to generate funds to advance a crucial project — replacing the crumbling mud walls of his home. Poisonous snakes regularly slither through the holes, menacing his family. He has been adding sections of cinder block to bar their path.

But this year, he could afford to apply only half the usual fertilizer. On a recent afternoon, his corn slumped under the tropical sun.

“From the look of things,” he said, “my crop is only going to be for consumption.”

By the time the cultivation season began in May, the ingredients for fertilizer were again widely available around the globe.

“The fertilizer market has stabilized,” Máximo Torero Cullen, chief economist at the Food and Agriculture Organization of the United Nations, said by telephone from his office in Rome. “I don’t see that much of a problem at this point.”

But farmers in much of Africa were still consumed with problems.

The price of everything was going up. Fertilizer was available, but many farmers could not afford it. The cost of staple foods like corn, rice and beans was multiplying. So was the cost of meat, because livestock is typically fed with the husks of grains.

In Washington, the Fed had been raising interest rates. Investors were selling a variety of currencies in riskier nations like Nigeria and buying suddenly more rewarding assets bought and sold in dollars.

Over the last year, the Nigerian naira has surrendered nearly half its value against the dollar. The fall in local currencies increases the cost of all imports, including ingredients to make fertilizer.

Fertilizer prices were far from the only source of distress for farmers. Catastrophic floods last year wiped out crops in northeastern Nigeria. In Abuja, the capital, the government eliminated subsidies for fuel this year, increasing transportation costs.

And the inability to afford fertilizer makes it harder for rural families to overcome such challenges.

Last year, Aisha Hassan Jauro, 40, a mother of five in the city of Yola, borrowed 100,000 naira (about $126) from a local bank at a 20 percent rate of interest. She used the money to buy fertilizer, seeds and pesticides while planting corn on her five acres.

The floods destroyed her crop, leaving her with neither food nor cash, but still facing monthly loan payments of 17,500 naira (about $22).

She and her husband buy spices and grains at a downtown market and sell them at higher prices in their village, earning enough for a single meal per day. They reserve their most nutritious food for the children — fried dough made from cassava flour — while the grown-ups subsist on boiled weeds pulled from their courtyard.

They took their daughter out of university, where she was studying disaster management. Another daughter cannot begin seventh grade because they lack the 2,500 naira fee (about $3) for a required test.

The land beckons as a potential source of recovery. But this year, with fertilizer even more expensive, they planted nothing.

For farmers accustomed to feeding their families, a trip to the market has become an indignity.

On a recent afternoon, Mr. Chubado arrived at the central market in Yola to supplement his meager harvest. He entered a labyrinth of muddy lanes choked with merchants. Boys wheeled wooden carts bearing eggs past women carrying baskets of plantains on their heads. Men stood over wooden tables, wielding knives to hack goats into fresh cuts of meat. The air was thick with the pungent smell of smoked fish, animal innards and diesel fuel, which powered clattering machines grinding corn into flour.

Mr. Chubado bought spinach, a purple onion and a bottle of peanut oil for cooking. The oil was double the price of a year earlier, so he bought half his usual amount.

He entered a stall where a man used a metal bowl to scoop urea from a large sack into two plastic shopping bags.

“I used to be able to buy a whole bag,” Mr. Chubado said sheepishly.

In Gombe, Juliana Bala has become acquainted with a sensation previously unknown in her 70 years — fear of hunger. She raised six children in a house provided by her husband’s employer, a local railroad. Neighbors traditionally shared meals with one another.

But on a recent morning, Ms. Bala endured the hourlong trek to her farm, down a muddy, rutted trail, and was horrified to see that her crop had been defiled. Thieves had stolen half her corn.

“I broke down and cried,” she said. “How can someone apply their hard work and energy and then they take your harvest?”

Nearly half her annual income was gone, threatening not only her ability to feed herself, her husband and the six grandchildren they are raising, but depriving them of the savings they needed to buy seeds and fertilizer the next year. They no longer eat meat or fish, subsisting on porridge made from yam and beans.

Crop theft was a new affliction. Ms. Bala took it as a sign — that there were enough hungry people to stray into criminality; that the warnings she had absorbed from her Lutheran preacher were coming to pass.

The final days were approaching, this the preacher had intoned for years. The pandemic was the first sign. The shortages of fertilizer and food — spurred by a war — seemed like the next one. And now, with half her crop disappeared, she could no longer feed the children.

“Life has changed,” Ms. Bala said. “I’m scared that this is the end of the world.”