The bill was passed in a vote of 153 to one with one abstention. Parliament's lower house, the State Duma, approved the law last week. The bill needs to be signed by Russian President Vladimir Putin to become law.
Russia's leading rights groups today said that some requirements in the new bill do not comply with international law.
NGOs say the law will make their work in Russia very difficult. The United States and the European Union say the law undermines democracy.
Sergei Lebedev, the chief of Russia's foreign intelligence service, says that foreign spies have been using humanitarian groups and NGOs as cover in Russia.