During the eight years of Ronald Reagan's presidency, Afghanistan was under Soviet occupation. During Mr. Reagan's tenure, the United States funneled millions of dollars in arms and equipment to Afghan rebels that helped them to eventually drive out the Soviet army.

Soviet troops had been in Afghanistan just more than one year when Ronald Reagan became president in January, 1981. A ragged resistance movement began fighting the occupying troops with antiquated weapons and was getting badly beaten in the process.

A staunch anti-communist, Mr. Reagan came to office determined to challenge Soviet expansionism. Steve Coll, author of the recent book Ghost Wars about U.S. policy in Afghanistan, says Central America got more attention during the Reagan years and was more controversial. However, says Mr. Coll, a former correspondent who is now managing editor of The Washington Post, Mr. Reagan saw the Islamic insurgents waging their jihad (or holy war) in Afghanistan as anti-communist freedom fighters.

"He became the jihad's most important public spokesperson, and often talked about Afghan freedom fighters in language that said as much about his idea of the global anti-Soviet cause as it did about Afghanistan, a place he never visited and I do not think knew terribly well,? Mr. Coll notes.

George Crile, a CBS News producer and author of another book on Afghanistan entitled Charlie Wilson's War, says Mr. Reagan was extremely cautious at first about the level of involvement in Afghanistan, because of political and bureaucratic opposition.

"Nobody believed you could do anything to dislodge the Red Army once it invaded that primitive country and occupied it with over 100,000 troops,? he said. ?So at that particular point, the CIA and the Reagan administration were content to wage a spoiling campaign with a limited amount of support. But, period, that was it."

Under the direction of CIA Director William Casey, the United States funneled small arms and equipment to the rebels, known as mujahedin or holy warriors, through Pakistan's intelligence service, but resisted giving them any sophisticated weaponry. Finally, says former CIA officer Milt Bearden, who ran the covert operation in Afghanistan in the mid to late 1980s, Mr. Reagan and Mr. Casey decided to ratchet up the level of assistance.

"Bill Casey and Ronald Reagan had come to the conclusion that we had slipped into a rhythm in Afghanistan that was in their own sense immoral,? he explained. ?We were more or less fighting to the last Afghan. And they thought we either need to move forward on this thing and ramp it up and drive the Soviets out or look hard at what we were doing."

After much internal debate, the Reagan administration decided in 1986 to provide the mujahedin with Stinger missiles, portable shoulder-fired surface-to-air missiles, a move, says Mr. Bearden, that proved pivotal. Three years later Soviet forces withdrew.

Shortly thereafter, communist rule in Eastern Europe began to unravel. Most analysts say the collapse of communism was, in part, due to the Soviet defeat in Afghanistan.

After the Soviet withdrawal, the United States quickly lost interest in Afghanistan and also spurned Pakistan, its onetime ally in the fight. The mujahedin took Kabul in 1992 and Afghanistan quickly descended into civil war.

A growing anti-Western sentiment began to take hold among the men Mr. Reagan had dubbed freedom fighters. Tired of war and civil strife, Afghans in 1996 welcomed the advent of the ultra-strict Islamist regime of the Taleban and the Taleban put out the welcome mat for the new terrorists.

Steve Coll says that because of Mr. Reagan, the United States won a mixed victory in Afghanistan.

"I think Reagan achieved many of the goals, the high-minded goals that he had in mind vis-?-vis communism and the Soviet Union,? he notes. ?But he never saw Afghanistan as a place where millions of people suffering would need long-term support after the conflict was over. I think that did contribute to the indifference that the United States displayed after the Soviets withdrew."

As Afghanistan today seeks to finally secure stability and peace, the ghosts of its turbulence still lurk in the form of unrepentant Taleban fighters and holy warriors-turned-warlords. For all the upheaval of the past and the uncertainty of today, Afghans still remember Ronald Reagan as the man who brought an end to a brutal occupation.