The upper house voted 131 to 94 to support the bill, which would also allow the justice minister to expel terrorist suspects.
The lower house, where Prime Minister Junichiro Koizumi's coalition enjoys a wider majority, approved the bill in March.
Under the bill, which will go into effect by November 2007, all foreigners aged 16 or older will be photographed and electronically fingerprinted when they enter Japan.
buy clomiphene online buy clomiphene online no prescription
Permanent residents, including ethnic Koreans born in Japan, will be exempt from the law, along with state guests and diplomats.
The information will be stored in a database for potential criminal investigations.
Koizumi's government says the law will help prevent terrorism and other crime in Japan, one of the United States' closest allies.
But the main opposition Democratic Party of Japan had called for a delay in the fingerprinting.
"This requires careful consideration so as to ensure privacy," it said in a statement.
"The international community has not neces