The future of the war in Afghanistan was on the line as Gen. Stanley McChrystal met with Defense Secretary Robert Gates in a secret rendezvous at a Belgian airbase in August. Gen. McChrystal, the top Western commander in Afghanistan, pushed for more U.S. troops to roll back the spreading Taliban-led insurgency. Mr. Gates, officials say, was skeptical. A quarter-century ago, he was a top Central Intelligence Agency officer aiding the anti-Soviet rebels in Afghanistan, and he remembered how a 1985 decision by the Soviet Union to widen that earlier war had failed to turn the tide. In a speech to the nation Tuesday from West Point, President Barack Obama will announce his decision on a request by Gen. McChrystal for 40,000 more U.S. troops, to join some 100,000 Western soldiers already here. Washington is also prodding reluctant allies to send as many as 10,000 additional soldiers. Debate inside the Obama administration on the troop increase has been intense, with Vice President Joe Biden cold to Gen. McChrystal's request and the U.S. ambassador to Afghanistan warning that such a surge would lessen pressure on the Kabul government to take over its own security. Mr. Gates's stance became a crucial factor in these deliberations. After initially challenging Gen. McChrystal to persuade him the result wouldn't mirror the Soviets' experience, the defense secretary is now backing a compromise of some 30,000 to 35,000 additional U.S. troops, close to the number likely to be endorsed by Mr. Obama. Few American officials know the Soviets' bitter Afghan predicament better than Mr. Gates. In the 1980s, he was the deputy director of the CIA, overseeing a massive U.S. effort to fund, train and equip the Islamic insurgents, called mujahedeen, who fought the Soviet army to a standstill. Now some of the most prominent of these insurgents, such as Gulbuddin Hekmatyar and Jalaluddin Haqqani, are allied against America with the Taliban and al Qaeda. Almost daily their men are killing Western troops, who often operate from former Soviet bases and use Soviet-drawn military maps with faint Cyrillic markings. "It's an eerie sense of deja vu," said Bruce Riedel, a Brookings Institution scholar who headed the Obama administration's Afghan policy review in the spring and who in the 1980s worked under Mr. Gates as a CIA officer in the region. "America," he said, "is in the rare position of fighting the same war twice in one generation, from opposite sides. And it's easier to be the insurgents." Comparing the Tolls There are major differences between the two conflicts. For one, unlike the isolated Soviet Union, America operates in Afghanistan under a United Nations mandate, part of a coalition of 42 allies. Allied dead, currently 1,528, are barely one-ninth the Soviet toll. Afghan civilian deaths are a small fraction of the estimated one million killed in the 1980s. Afghans who compare the two campaigns acknowledge the differences, yet argue that these aren't always in America's favor. An examination of this debate over the Soviet experience offers an insight into what American troops are up against -- and the issues President Obama must weigh as he decides the course of an unpopular and costly war he didn't start. Soviet leader Mikhail Gorbachev also faced a troop-increase request during his first year, for a war he had inherited. Soviet generals in 1985 asked for tens of thousands more soldiers to bolster their 100,000-strong contingent, roughly the same size as the current Western force in Afghanistan. Mr. Gates, discussing that period in his 1996 memoir "From the Shadows," wrote: "The Soviets had to either reinforce or lose. Because they clearly were not winning." Gen. McChrystal used similar language in his recent warning about possible American "failure" in Afghanistan unless adequate resources are committed. Mr. Gorbachev ended up authorizing a small troop surge; 18 months later, he announced plans for a withdrawal. The U.S. Army, in a 1989 secret "lessons learned" study of the Soviets' campaign, said they simply didn't have enough boots on the ground. "Insufficient forces were available to expand appreciably the area of physical control, or to identify and attack many insurgent targets at the same time," said the study, now partially declassified. "When major operations were conducted in one part of the country, forces had to be drawn from other areas." Mr. Gates's knowledge of how the Soviet occupation and its brutalities inflamed local anger contributed to his initial skepticism about a U.S. surge. "I worry a great deal about the size of the foreign military footprint in Afghanistan," he told a Senate hearing in April. "Soviets were in there with 110,000 troops, didn't care about civilian casualties and couldn't win." Gen. McChrystal, at his meeting with Mr. Gates in Belgium, managed to persuade the defense chief that the U.S., unlike the Soviets, is still welcomed by most Afghans. The general argued that certain tactics such as using Afghan rather than American soldiers for house searches could further blunt perceptions of the U.S. as an occupier and put the momentum in America's favor. "I take seriously Gen. McChrystal's point that the size of the footprint is [less important than] the nature of the footprint and the behavior of those troops and their attitudes and their interactions with the Afghans," Mr. Gates said in September after talks with military leaders. Gen. McChrystal has explicitly addressed concerns about falling into Moscow's pitfalls. In his August assessment of the war, he quoted Abdul Rahim Wardak, President Hamid Karzai's defense minister, as telling the U.S.: "Unlike the Russians, who imposed a government with alien ideology, you enabled us to write a democratic constitution and choose our own government. Unlike the Russians, who destroyed our country, you came to rebuild." 'Miss Those Days of Peace' Yet many Afghans, including some other cabinet ministers, are drawing parallels between the two foreign interventions, and the comparisons are not always this flattering. In Afghanistan's dusty capital, dotted with blast barriers, talk of democracy is hard to square with widespread ballot-stuffing during Mr. Karzai's recent re-election. As for rebuilding, the middle classes here still aspire to live in Soviet-built neighborhoods of decayed housing blocks that would be an eyesore elsewhere but are luxurious by Afghan standards. Despite billions in U.S. aid since 2001 spent on roads, clinics and schools, there is little comparably prominent evidence of American reconstruction. "What have the Americans done so far? They're only busy building their own military bases," said Mohammad Nassim, a 40-year-old Kabul resident, airing a frequently heard opinion. In the 1980s, hundreds of Soviet civilian families lived in Kabul without much protection. Today, almost all Westerners here live behind in walled and guarded compounds and guesthouses. "Believe me, I miss those days of peace and security," said Hussain Jawad, a 48-year-old Kabul shopkeeper, of the Soviet period. The occasional nostalgia for the past and anger at today's foreign forces don't necessarily lead to sympathy for the Taliban, a movement loathed by many Afghans, especially outside the ethnic Pashtun belt in the south and east. Afghanistan hasn't reached a point where a majority equate U.S. soldiers with the Soviets and back the rebels, said Farooq Wardak, who once was a guerrilla fighter against the Soviets and now is minister of education. "But," he added, "I'm afraid that, if no attention is paid to what's happening on the ground, we're moving toward that point." Portraying Americans here as the new Soviets, of course, forms the very foundation of the Taliban world view. "Both superpowers wanted to impose by force their alien ideologies on our country -- the Soviets socialism, and the Americans this strange phenomenon they call liberal democracy," Mullah Wakil Muttawakil, foreign minister of the Taliban government that was deposed in 2001, said in an interview. "These are outside ideas. And anything coming from abroad is resented and rejected here." Mr. Gates takes such warnings seriously, cautioning about the dangers of al Qaeda and the Taliban gaining global momentum should the U.S.-led coalition fail here. Afghanistan "is the modern epicenter of jihad...where the mujahedeen defeated the other superpower," he said last month. "And their view is, in my opinion, that they now have the opportunity to defeat a second superpower, which more than anything would empower their message and the opportunity to recruit, to fund-raise and to plan operations." Coming Full Force The U.S. invaded in self-defense after Sept. 11, 2001; the Soviets had no moral high ground. Still, the story of Soviet involvement here is complicated. By most accounts, Soviet leaders were caught unawares in April 1978 when leftist Afghan army officers ousted the Afghan president, Mohammad Daud Khan. A now-declassified 1979 CIA memo reported "no convincing evidence" of Soviet complicity in the coup. The new regime executed tens of thousands of suspected adversaries. But it was its social agenda -- women's literacy, land reform and abolition of the dowry -- that infuriated the conservative Afghan society and inflamed an Islamist insurgency. By late 1979, the new government had lost control over most provinces. Its president, Hafizullah Amin, repeatedly asked for full-scale Soviet help. The Kremlin was wary, but it feared the rebellion could spread to Soviet republics. During Christmas 1979, Moscow finally acceded to Mr. Amin's intervention requests, though not in a way he imagined. Soviet commandos assassinated Mr. Amin, replacing him with the leader of a more moderate Communist faction, Babrak Karmal. Mr. Karmal appealed for national reconciliation and pledged to respect Islam. The Soviets expected to stay just a few months. The reconciliation appeal went nowhere. Aiming to trap the Soviets in a Vietnam-like quagmire, the U.S. and an unlikely alliance ranging from Pakistan to Egypt to China to Iran rolled out a huge program to arm, finance and train the mujahedeen. The Taliban enjoy nowhere near this backing, only a degree of mostly covert help from certain Persian Gulf financiers and parts of the Pakistani security establishment. "If we compare the two cooperations, today Pakistan is doing nothing," complains the Taliban's Mullah Muttawakil. Crucially, the Taliban have nothing like the Stinger antiaircraft missiles the U.S. supplied to the mujahedeen, downing hundreds of aircraft and offsetting Mr. Gorbachev's surge by denying air cover to Soviet troops. Such skewed odds make it even more galling to some Afghans that vast chunks of their country have fallen under Taliban rule. "Considering that the insurgents are so poorly equipped, it's truly amazing that they've been able to extend the war to Kabul and to the north," said Sakander Zohori, who was chief of security for the southern city of Kandahar under the Afghan Communist regime. The Karzai government fully controls only Kabul, the provincial capitals and a few other areas. Even the main supply roads north and south of Kabul are studded with Taliban checkpoints. All over the country, the Taliban run shadow local administrations, collecting taxes and dispensing justice. "There is a total lack of government authority in rural Afghanistan, which is similar to Soviet times," said Haroun Mir, director of the Afghanistan Center for Research and Policy Studies. Like the Obama administration, which is frustrated by corruption and incompetence in the current Afghan government, Mr. Gorbachev quickly grew dissatisfied with his client in Kabul, President Karmal. Paving the way for withdrawal, Moscow replaced him with the pragmatic intelligence chief, Mohammed Najibullah, who offered a unity government with the insurgents while building an administration remembered by some here as relatively competent and clean. Against all predictions, after the last Soviet soldier left in February 1989, Mr. Najibullah's government, instead of collapsing, went on the offensive. Scoring key victories against the rebels, it outlived the Soviet Union, unraveling only when Russian-supplied food and weapons ran out. Absent continuing American aid for the guerrillas, it could have remained in power much longer, many former mujahedeen say. Few in Kabul expect the Karzai government would display similar longevity should Western forces go home. "Najibullah had the support of a strong and well-equipped Afghan army, air force and intelligence, and of a strong party," said Mohammed Mohaqeq, a powerful former mujahedeen commander who is a parliament member and a Karzai supporter. "I don't think we can even compare these two governments to each other."