The last main Soviet convoys leaving Afghanistan have passed through the Salang mountain pass in a perilous withdrawal that left three soldiers dead in avalanches, Soviet television said Friday.

The armored columns that crawled through the Salang now will link up with smaller convoys in the Hindu Kush mountain region in an operation that "will roll up the Soviet forces along the way like a stocking," Soviet commentator Mikhail Leshinsky said."All the columns have passed through the Salang, and ahead lies the slightly more than 120 miles to the Soviet border," Leshinsky said.

Under the U.N.-sponsored Geneva accords signed by the Soviet Union on April 14, 1988, all Soviet forces must leave Afghanistan by Wednesday. At the war's height, 103,000 Soviet troops were in the country, but that number has dwindled to about 20,000, Soviet officers said.

The 250-mile Salang highway threading its way through the Hindu Kush is the main passage that leads to the Soviet Union. But the key mountain pass, which begins about 30 miles north of the Afghan capital, Kabul, became virtually impassable at times during the Soviet armored exodus, the Soviet television report said.

"In February alone there were 30 avalanches, and merciless winds dropped temperatures to minus 22 (degrees Fahrenheit)," it said. "Some convoys moved right through avalanches, but several vehicles careened off the mountain road into abysses, and three men perished as a result."

The report did not say what day the soldiers were killed, but rumors of three deaths due to avalanches were heard Sunday when Moscow-based correspondents rode a short distance with a convoy to the Soviet border city of Termez.

Besides the deaths due to avalanches, shelling by Afghan anti-communist guerrillas along the Salang has killed one Soviet soldier, Soviet television said Thursday.

Soviet officials have not said how many soldiers have died during the exodus from Afghanistan. The last casualty figures for the war were given when the pullout started in May. Those put Soviet deaths in nine years of war at 13,310 with 35,478 wounded.

Lt. Gen. Boris Gromov, commander of the Soviet forces in Afghanistan, has said the withdrawal is proving more difficult than expected. But he has vowed that all the troops will be out by the Feb. 15 deadline and said he will be the last Soviet soldier to leave the country.

Meanwhile, a chartered jet brought 30 tons of wheat and dried milk to Kabul's neediest residents Friday, beginning a U.N. airlift after a two-day delay. Soviet military transport planes have been flying food to Kabul, which is packed with two million people and surrounded by guerrillas.

Guerrilla blockades and attacks on supply convoys created severe food and fuel shortages.