The United States and other Western powers have one overriding reason for supporting Afghanistan's revolution despite reservations about its pro-Soviet bent - its avowed determination to smash the gigantic opium trade.

With international cooperation cutting into opium in Southeast Asia's "Golden Triangle" and Mexico, the world's least-controlled opium production is now centered in tribal areas straddling the Afghan-Pakistani border, foreign specialists say.

Annual production is estimated at 300 tons in Afghanistan and 400 to 600 tons in Pakistan. One specialist said, "Either it's getting bigger or we are starting to recognize it for what it is."

Experts estimate that a third of the output is consumed in Pakistan and Afghanistan, but believe that more and more opium is being refined into heroin for the European trade in laboratories in western Iran, southern and eastern Turkey and possibly western Afghanistan.

West Germany is said to be favourite target, thanks to the large Turkish migrant population that is active in the illicit trade, and specialists are convinced that it's just a matter of time before the heroin reaches New York.

The biggest problem for the government is establishing its authority in areas traditionally outside central control. Pushtun tribesmen on the Afghan side of the border have long been pretty much a law unto themselves in a country where government orders often have been ineffective 30 miles outside this capital city.

On the other side of the border, Pakistan's northwestern frontier province is described as virtually a state within a state where Pushtun tribesmen call the shots - and control the durg traffic.

Recently, however, a battalion-sized Pakistani army operation reportedly smashed a heroin refinery near the provincial capital of Peshawar.

Specialists are convinced the Afghan government that seized power April 27 is serious about its promise to adopt "effective measures" to eliminate "addiction to alcohol, hashish, opium and other narcotics.

Particularly encouraging to apponent of the drug traffic are plans to break up large feudal estates. This program should facilitate international police antismuggling operations sponsored by the United Nations.

A major obstacle to effective control is economic: many Afghan farmers depend on the cultivation of poppies - the source of opium - for their livelihood.

Dr. Shah Wali, Afghan minister of planning and public health and the government's No. 3 man, said in an interview that Afghanistan needs "a lot of assistance from abroad, especially economic help, to help replace farmers' incomes dervied from opium poppy cultivation."

Foreign specialists are convinced the government will not move forcefully against the opium trade until financing of a crop substitution plan is agreed upon.

The average poppy farmer's income is estimated at about $3,000 annually, a fortune in a country where per capital revenue is estimated $80 a year.

A possible model, the Turkish opium poppy eradication program of the early 1970s, was based on American government subsidies of $15 a kilo of opium, then priced at $35 a kilo.

Any similar program here is likely to prove expensive. In the last three years, the price of Afghan opium has increased from $220 a kilo.

In a rare criticism of the Soviet Union, usually praised unstintingly by Afghan officials, Shah Wali said "The Soviets should take an interest" in the opium problem because of the closeness of the growing area to their borders. He clearly suggested that the Soviets had shown no such interest so far.

Shah Wali praised West Germany, which provides technicians for the U.N. program, and Denmark, which gave $350,000 to treat Afghan addicts. Their numbers are conservatively estimated at 1,000,000 although some specialists believe perhaps half the male population of northern Afghanistan is addicted.

Shah Wali said he has discussed the problem with American officials, but indicated that the talks had been inconclusive. He said the new Afghan government takes the problem "a lot more seriously" than did the Mohammed Daoud regime that was overthrown in April.

Foreign diplomats agree. They said Daoud's anti-opium measures were small-scale and limited to the areas around Jelalabad in the east and Kandahar in the south.

Specialists say as much as half the Afghan opium production is accessible and could be eliminated without the use of light planes, helicopters or other expensive equipment.