About 300 Afghanistan refugees stood in a chilly drizzle two blocks from the Soviet Embassy in downtown Washington yesterday afternoon to protest the Soviet invasion of Afghanistan eight years ago.

During the sometimes emotional 2 1/2-hour demonstration, participants waved black, red and green Afghan flags, hanged Soviet leader Mikhail Gorbachev in effigy, and carried signs calling for the withdrawal of Soviet troops from their country.

Similar protests to mark the eighth anniversary of the Soviet invasion of Afghanistan were scheduled in New York, San Francisco, Los Angeles, London, Paris, Rome, Frankfurt, Sydney, New Delhi, and Peshawar, Pakistan.

The Associated Press in Moscow reported that police roughed up a group of Soviets protesting the Kremlin's military involvement in Afghanistan yesterday, dissident sources said.

Thirty people were reported detained in Moscow and at a similar action in Leningrad.

Pentagon sources estimate that 120,000 Soviet troops remain in Afghanistan.

Last week, U.S. military sources reported that the Soviet Union had moved 10,000 Soviet and Afghan troops into battle along a mountain road to break U.S.-armed guerrillas' siege of the garrison town of Khost in eastern Paktia province.

The move, the Soviets' biggest military operation in Afghanistan in two years, comes at a time when Soviet leaders are talking increasingly about withdrawing troops.

On Dec. 27, 1979, more than 30,000 Soviet troops crossed the country's northern border to fight Moslem rebels.

Since the fighting began, more than 1 million Afghans have been killed, 1.5 million have been wounded, and nearly 5 million have fled to Pakistan, Iran, India, Europe and the United States, according to Mohmad Nabni Salehi of the Islamic Revolutionary Movement of Afghanistan, a group based in Annandale.

"We are protesting the continuation of the occupation of our country," Salehi said. "Two weeks after Gorbachev visited the Washingon summit, the Soviets have sent 15,000 soldiers to the battlefront, and they have killed more than 1,500 Afghanistan civilians, not freedom fighters. We want them to stop the hostilities. This will not be turned into a blood bath."

Speaking in Pashtu and English but mostly in Persian, a half dozen speakers stood in the bed of a rented red pickup truck that was parked at 16th and K streets NW.

Their backs were to the White House as they faced the Soviet Embassy on 16th Street NW, and shouted in English, "Get out of Afghanistan!" and "Death to the KGB!"

They carried signs reading "Afghans Can Fight Forever, Can You?" and "No Peace in Afghanistan Without Total, Unconditional and Immediate Soviet Withdrawal."

Many of the protesters said they had fled from their native country in the months after the Soviet invasion.

"I lost my three brothers and 150 family members . . . since the communists attacked," said Mader Shahalemi, the president of Islamic Unity, a Pakistan-based refugee group, as he held the hand of his 10-year-old son M. Naser. "Afghanistan wants brotherhood with everyone but the communists. We want peace for all the world. Not for the special places. Not for just those with muscle."

Shahalemi said he was a police officer in Kabul involved with communications before the Soviets put him in jail for six months. His family now lives in Philadelphia.

A 19-year-old former freedom fighter, Noor Karzai, who lives in Silver Spring, said he wants to return to Afghanistan next summer. He is not worried about the danger of war: "When we fight against Russia, we don't care."

The protest, which was made up mostly of Afghans from New York, New Jersey, Pennsylvania and the Washington area, also drew support from other countries occupied by the Soviets.

D.C. police arrested one man for disorderly conduct. Ahmad Nessah Afzal, 27, of Portland, Maine, was arrested after he allegedly ripped down a yellow police line marker.