Heavy snow that has blanketed large parts of Afghanistan, killing at least 20 people, could end a long-running drought that last summer threatened millions of people with severe food shortages, government and aid officials said on Wednesday.

But the weekend snowfall and avalanches across the mountainous north and centre could bring a bitter winter and short-term hardship to many people, with many roads still cut off, hampering food delivery in several hard-hit provinces.

Government officials said the snow, when it melts in the spring, should end a near-decade long dry spell. Last year about 80 percent of the country's non-irrigated wheat crop was ruined in almost half the country -- 14 of Afghanistan's 34 provinces -- hitting almost three million of the country's poorest people.

The current rain and snow will benefit our underground water table and we hope now to have a year of good harvests, said Ghulam Rabani Haqiqatpal, statistics director at the Ministry of Agriculture, Irrigation and Food.

We will have snow and rain until May now, so we hope the water shortage will finish in Afghanistan, he told Reuters.

Scores of Afghans die each year due to the cold, although farmers and small communities also rely on snowfall between December and April to bring water for the summer's food and cash crops.

The United Nations last year appealed for urgent international aid to get food and shelter to provinces including Ghor, Daikundi, Bamiyan and Badakhshan after rains failed for the eighth time since 2000.

Afghanistan needs about 5.2 million metric tons of wheat, the staple crop, a year. The country normally produces 4.5 million tons of wheat each year and imports the rest.

The UN's World Food Programme also said it was cautiously optimistic that this year's snow would break the dry cycle, as it had come early in the winter, meaning it was likely to melt more gradually.

A provincial official in mountainous Badakhshan province said that avalanches in northeastern Afghanistan had cut off tens of thousands of people already suffering food shortages and appealed for more aid to avert a humanitarian crisis.

(Additional reporting by Mirwais Harooni; Editing by Nick Macfie)