KARACHI — Summers in the city — and across much of Pakistan — are relentless. Temperatures typically hit 100 degrees, power outages drag on for hours, heatstroke is common, and while monsoon rains bring some relief, they bring great ruin through widespread flooding. But there is one thing that makes Pakistanis anticipate the torpid summer months — mangoes.

With their golden yellow, blushing pink and pale green hues coloring markets by the cart-full, Pakistani mangoes are a source of national joy and pride. But bad luck — and poor logistics — are now threatening Pakistan’s king of fruits.

The country is the fifth-largest producer and third-largest exporter of mangoes in the world. For as long as I can remember, mangoes have turned oppressive summers into seasons of celebration and amity. Friends and families share crates of the finest mangoes. Rival tribes exchange baskets to resolve arguments. Hotels and restaurants host mango festivals featuring mango puppets or 4-foot-high, mango-shaped cardboard cutouts strung with streamers.

Pakistan’s love affair with the mango is culturally ingrained. Mirza Ghalib, the foremost Urdu-language poet of the Mughal era, was an avid mango eater who measured his health and joie de vivre by the number of mangoes he was able to consume.

Nothing (except perhaps cricket) will stir Pakistani nationalism more than the suggestion that another country’s mangoes could taste half as good as Pakistan’s. The only point of contention is which of the country’s hundreds of mango varieties is the most delicious: chaunsa, langara, sindhri, anwar ratol? (My vote goes to the subtle and aromatic anwar ratol.)

Last summer, Pakistani growers were thrilled at the prospect of countries beyond Asia finally enjoying their mangoes. Not only did the British retailer Asda start stocking Pakistani mangoes, but the first-ever shipment of Pakistani mangoes arrived in the United States in July 2011 after USAID helped Pakistan to meet U.S. standards of pest control and post-harvest management. New exports to Western markets were expected to be a boon to local farmers.

But this summer’s crop has not met expectations — some mango varieties ripened too late in the season, others are too small or are lacking in taste or texture. Pakistan is now likely to fail to meet its mango export target of 150,000 tons by September, instead managing to export only 100,000 tons.

This is partly because of last year’s monsoon and subsequent flooding, which reduced mango productivity by 30 percent. According to some estimates, up to a quarter of all mango farms in the southern province of Sindh were completely washed out.

But a big part of the shortfall is due to poor logistical planning: containers needed to ship mangoes are in short supply; Pakistan International Airlines does not appear to have the proper infrastructure to make shipments; international shipping companies have transported mangoes to the wrong destination or failed to secure the fruit against damage or theft en route; a cumbersome distribution system has caused Pakistan to lose out in the Asian mango market to China and India. Meanwhile, U.N. sanctions against trade with Iran have also caused a loss of $10 million to Pakistan’s mango growers, who previously exported up to 40 percent of their crop to the neighboring country.

All this bodes poorly for the future. Meagre profits — or in some cases, losses — from exports, coupled with last year’s widespread damage to mango farms, could compromise future yields. This would be nothing less than tragic, especially given that a worsening economic and security situation means that there are ever fewer things for Pakistanis to enjoy.

I, for one, am not taking any chances. This summer, I’m scarfing down mangoes at every opportunity. But my real hope is that the Pakistani mango’s reign endures for many years to come.

Huma Yusuf is a columnist for the Pakistani newspaper Dawn and was the 2010-11 Pakistan Scholar at the Woodrow Wilson International Center for Scholars in Washington.