TOKYO — The kind of greeting a foreigner receives at immigration upon arrival at an international airport can be a good, if imperfect, indication of the country that waits on the other side of the barrier.
London's Heathrow? Long queues and lousy service.
New Delhi's Indira Gandhi International? Crumbling infrastructure and over-the-top bureaucracy.
Some Middle Eastern airports? Slow-moving lines that can be circumvented with the right connections and cash.
Now the Japanese government has created new immigration procedures for foreign visitors -- rules that critics say are all too revealing about official attitudes toward foreigners.
On Nov. 20, Japan will begin fingerprinting and photographing non-Japanese travelers as they pass through immigration at air and sea ports. The government says the controls are a necessary security measure aimed at preventing a terrorist attack in Japan.
The new system is modeled on the U.S. program instituted in 2004 that takes digital photos and fingerprints of travelers entering the United States on visas. But the Japanese system goes further by requiring foreign residents -- in addition to visitors -- to be photographed and fingerprinted.
There are exceptions: diplomats, children younger than 16, U.S. military personnel serving in Japan, and long-term residents of Korean or Chinese descent whose presence here is largely owed to Imperial Japan's overseas conquests. But all other foreigners will be scanned each time upon entry.
Critics say the data collection is a dubious terrorism-fighting measure, instead reflecting the government's desire for closer surveillance of foreigners.
"The Japanese government has a long history of not wanting long-term foreign residents, and they really feel they need more control over foreigners," said Sonoko Kawakami of the Japanese chapter of Amnesty International. "The government just wants to gather as much information as possible on people."
The only terrorist spectaculars in Japanese history have come from homegrown groups: the Japanese Red Army, which conducted attacks around the world in the 1970s and '80s, and the Aum Shinrikyo cult, which carried out a sarin gas attack on the Tokyo subway in 1995.
But officials say Tokyo's support for the U.S.-led wars in Iraq and Afghanistan makes Japan a target, and taking biometric data such as fingerprints and digital facial photos is the only way to nab terrorists traveling on fake passports.
At least that was the recent contention of Japan's justice minister. He even offered a bizarre personal anecdote to explain how easy it was for non-Japanese to sneak into the country. "A friend of my friend is a member of Al Qaeda," Kunio Hatoyama told foreign reporters in Tokyo, saying that the man had entered Japan numerous times using fake passports and disguises.
Hatoyama later backtracked slightly on his story, distancing himself from any connection to Al Qaeda and raising suspicions that he had embellished his anecdote to press the case for fingerprinting foreigners.
But Hatoyama has long been among the senior public officials who believe Japan is already too open to overseas workers. When he became justice minister in August, Hatoyama made it clear he had no intention of proceeding with earlier plans to allow in more unskilled workers.
That, he warned, could lead to an increase in crime.
Statistics, however, show that the number of crimes committed by foreign visitors is falling. And despite alarm about particularly sensational crimes that attract media attention, Japan's overall crime rate is declining or flat.
That hasn't stopped some senior Japanese politicians from stoking anti-immigrant fires by contending that foreigners living in Japan commit a higher proportion of crimes. And those contentions have sent bureaucrats in search of ways to weed out the "good" foreigners, presumably those with money to invest, from "bad" ones, such as the Chinese pickpocket gangs that get so much media attention here.
The new immigration system appears to be one answer. Fingerprinting is actually a resumption of a system that was abandoned in 2000 after strong protests by long-term Korean, Chinese and Taiwanese residents who resented being fingerprinted in their own country. A jittery, post-9/11 America provided the initiative for the Japanese to revive it.
The law instituting the new regime passed parliament last year with very little outcry. The Federation of Japanese Bar Assns. was a lonely critical voice, complaining that fingerprinting people who had already been granted residency was an infringement on civil liberties. But the government avoided a repeat showdown with the Koreans and Chinese by exempting them from the new requirements.
"The Japanese public does not see this as 'our' problem," said Masashi Ichikawa, a human rights lawyer in Tokyo. "The climate is that it is legitimate to be 'against terrorism,' and that people just have to follow the rules."
The fingerprinting issue underscores the Japanese dilemma in dealing with foreigners.
On the one hand, in this age of increased global mobility, the threat of terrorism, though remote, is a plausible one.
But on the other, the Japanese government needs more foreigners. Japan has low unemployment by global standards and faces a demographic crunch as its population ages and workforce shrinks. Tokyo is fighting to preserve its position as a world financial center as competitors such as Singapore actively cultivate a welcoming aura for foreign businesses.
And Japan is still searching for ways to address its tourist deficit at a time when well-heeled travelers have a widening array of Asian destination choices.
It remains to be seen whether treating every visitor as a potential terrorist, until their fingerprints prove otherwise, is the best way to roll out the welcome mat.
Naoko Nishiwaki of The Times' Tokyo Bureau contributed to this report.