The bill comes days after the Russian state-funded RT registered with the US Justice Department as a foreign agent following pressure from Washington.
US intelligence agencies allege that RT served as a Kremlin tool to meddle in the 2016 US presidential election. Russia has denied any interference.
Russian President Vladimir Putin harshly criticised the US demand regarding RT as an attack on freedom of speech, and had warned that Russia would retaliate.
The bill will now pass to the upper house, which is expected to quickly rubber-stamp it next week, and then to Putin for signing.
More From This Section
Putin's spokesman Dmitry Peskov said the legislation will provide the necessary framework for the government to retaliate any moves against Russian media abroad.
"Any infringement on the freedom of Russian media abroad will not be left without a harsh answer," Peskov said. He added that the government will "use the opportunities offered by the bill for a timely quid-pro-quo response."
He noted that the measure would allow Russia to mirror the US demands for RT or any other such action taken by other countries.
"I would like to hope that it will only be used once and there will be no need for more retaliatory action," he added. Pyotr Tolstoy, a deputy speaker of the Duma who authored the bill, said he expects the Justice Ministry to take "pinpoint retaliatory measures."
Even before the bill's full approval, the Justice Ministry quickly sent letters to US government-funded broadcaster Radio Free Europe/Radio Liberty, warning that some of its operations could face restrictions under the new legislation.
Joanna Levison, director of media and public affairs at RFE/RL, said the letters were addressed to its Russian Service and Idel Realii, the Volga region website. "They inform us that we may be subject to restrictions under the 'foreign agent' law," she said.
Media outlets singled out as foreign agents will face the requirements currently applied to foreign-funded non- governmental organisations under a 2012 law.
It requires them to publicly declare themselves as such and regularly provide detailed information about their funding, finances and staffing.
Just like the 2012 law, the new bill is loose enough to target anyone.
Maria Lipman, an independent Moscow-based analyst, said the new legislation looks "intentionally blurred" and will work "as a truncheon raised in the air, so that various organisations ... should be intimidated not knowing whose head this truncheon will hit."
"This legislation strikes a serious blow to what was already a fairly desperate situation for press freedom in Russia," Denis Krivosheev, the group's deputy director for Europe and Central Asia, said in a statement.
"Over the last couple of years, the Kremlin has been tirelessly building a media echo chamber that shuts out critical voices, both inside Russia and from abroad."
The German government also strongly criticised the legislation.
"We view this new media law with concern and surprise," Chancellor Angela Merkel's spokesman, Steffen Seibert, told reporters in Berlin.
German Foreign Ministry spokesman Rainer Breul noted that the legislation hasn't yet passed so "it is perhaps a bit early to talk about the concrete consequences."
"Ultimately a lot will depend on how exactly the law is implemented and to what extent it restricts foreign media's ability to act," he said.