Federal Judge Julier Sebastiao da Silva, furious at US plans to fingerprint and photograph millions of visitors entering the United States, ordered Brazil's authorities to do the same to US citizens from Thursday onwards.
"We've begun doing this," said a Federal Police spokeswoman at Brazil's Guarulhos International Airport in Sao Paulo.
The judge's order came after a Brazilian government citizens' rights agency filed a complaint in federal court about the US measure.
The US-VISIT system is meant to identify people who have violated immigration controls, have a criminal record or belong to groups the US government lists as "terrorist" organisations.
Starting on Monday, people who need visas to enter the United States will be fingerprinted and photographed when they pass through immigration at major US airports and seaports.
"I consider the act absolutely brutal, threatening human rights, violating human dignity, xenophobic and worthy of the worst horrors committed by the Nazis"
Judge Sebastiao da Silva
The measure does not apply to citizens of 27, mainly European, nations who do not need a visa to enter the United States.
"I consider the act absolutely brutal, threatening human rights, violating human dignity, xenophobic and worthy of the worst horrors committed by the Nazis," said Sebastiao da Silva in the court order released on Tuesday.
Officials at the US Embassy in Brazil were not immediately available to comment on Brazil's decision.
Brazil requires US citizens to have a visa when entering the country.