MOSCOW — President Vladimir Putin on Friday signed a law banning Americans from adopting Russian children, abruptly terminating the prospects for more than 50 youngsters preparing to join new families and sparking critics to liken him to King Herod.
The move is part of a harsh response to a US law targeting Russians deemed to be human rights violators. Although some top Russian officials, including the foreign minister, openly opposed the measure, Putin signed it less than 24 hours after receiving it from Parliament, where it passed both houses overwhelmingly.
The law also calls for the closure of nongovernmental organizations receiving American funding if their activities are classified as political — a broad definition many fear could be used to close any nongovernmental group that offends the Kremlin.
The law takes effect Jan. 1, the Kremlin said. Children’s rights ombudsman Pavel Astakhov said 52 children who were in the pipeline for US adoption will stay in Russia.
The ban is in response to a US measure signed into law by President Obama this month that calls for sanctions against Russians assessed as human rights violators.
That law stems from the case of Sergei Magnitsky, a Russian lawyer who was arrested after accusing officials of a $230 million tax fraud. He was repeatedly denied medical treatment and died in jail in 2009. Russian rights groups said he was severely beaten.
A prison doctor who was the only official charged in the case was acquitted by a Moscow court Friday. Although there was no demonstrable connection to Putin’s signing the law a few hours later, the timing underlines what critics say is Russia’s refusal to responsibly pursue the case.
The adoption ban has angered both Americans and Russians who argue it victimizes children to make a political point, cutting off a route out of frequently dismal orphanages for thousands of children.
‘‘The king is Herod,’’ popular writer Oleg Shargunov said on his Twitter account, referring to the Roman-appointed king of Judea at the time of Jesus Christ’s birth, who the Bible says ordered the massacre of young Jewish children to avoid being supplanted by a prophesied newborn king of the Jews.
US State Department spokesman Patrick Ventrell expressed regret about Putin’s signing the law and urged Russia to ‘‘allow those children who have already met and bonded with their future parents to finish the necessary legal procedures so that they can join their families.’’
Vladimir Lukin, head of the Russian Human Rights Commission and a former ambassador to Washington, said he would challenge the law in the Constitutional Court.
The US law galvanized Russian resentment of the United States, which Putin has claimed funded and encouraged a wave of massive antigovernment protests that arose last winter.
The Parliament initially considered a relatively similar retaliatory measure, but amendments have expanded it far beyond a tit-for-tat response.
UNICEF estimates that there are about 740,000 children not in parental custody in Russia while about 18,000 Russians are on the waiting list to adopt a child. The United States is the biggest destination for adopted Russian children — more than 60,000 of them have been adopted by Americans during the past two decades.
Russians historically have been less enthusiastic about adopting children than most Western cultures. Putin, along with signing the adoption ban, Friday issued an order for the government to develop a program to provide more support for adopted children.