"On November 10, the Federal Customs Service issued general permission for rail transit of Bundeswehr arms, military equipment and supplies to Afghanistan," Andrei Nesterenko said.
He said the decision was unprecedented in Russia's relations with foreign states, and was made due to its "close cooperation with Germany in countering shared security threats and challenges."
Russian President Dmitry Medvedev earlier on Thursday signed a decree allowing logistics supplies for Spanish troops in Afghanistan to pass through Russian territory.
A document posted on the Kremlin website said the decree concerned an agreement "between Russia and Spain on the transit of military supplies and personnel through Russian territory to support the Spanish military contingent as part of a security and development mission in Afghanistan."
NATO's International Security Assistance Force (ISAF) has about 53,000 troops in Afghanistan under a UN mandate to help give security support to the Afghan government and stop the flow of drugs from the country. As of October 2008, Spain had contributed 780 personnel to the ISAF.
The Taliban, ousted from power in Afghanistan after a U.S.-led military operation in 2001, has been stepping up their activities in recent months.
Despite the recent deterioration of relations with NATO, Russia continues to support the military alliance's operations in Afghanistan, and has said it shares NATO's concerns over the worsening security situation in the country.