By Chris Hogg
BBC News, Tokyo
Japan has started to fingerprint and photograph all foreigners when they arrive in the country.
The move affects all foreigners in Japan, whether tourist or resident
It is only the second country after the United States to check foreigners in this way.
But unlike the US, which only checks foreign visitors, Japan will require foreigners living in Japan to be checked each time they enter.
The Japanese government says it is an anti-terrorism measure but others say it is discrimination.
Any foreigner entering Japan will now be fingerprinted and photographed.
The biometric data will be checked against lists of people who have been deported from the country in the past.
There will also be cross-checks with more than 800,000 pieces of information relating to suspects wanted by the Japanese authorities and the international police organisation Interpol.
Japan says the new move is an anti-terrorist measure that will also cut crime.
Human rights organisations say it violates foreigners' rights to privacy and could encourage xenophobia.
They complain it implies that foreigners are most likely to commit acts of terrorism or commit crimes on Japanese soil.
So far there has been no terrorism in Japan committed by foreigners.
Incidents like the sarin gas attacks on commuters on the Tokyo subway were carried out by other Japanese.
There are also concerns that the information gathered will be shared with immigration authorities in other countries.
Foreigners who have visas which allow them to live in Japan, meanwhile, are angry that they will now be treated the same as visitors and subjected to longer waits when they re-enter the country.
Japan insists, though, that the measures are needed to help keep terrorists out.
Tokyo's staunch support of the US-led invasions of Afghanistan and Iraq have raised concerns that Japan could be a terror target.