Facial recognition technology will be deployed at major airports in fiscal 2019 to screen foreign visitors as they leave Japan, a Justice Ministry official said Monday.

Similar gates are being used at Tokyo’s Haneda airport to screen returning Japanese, but the new plan will allow the Immigration Bureau to allocate more human resources to the processing of foreign arrivals, shortening waiting times, the official said. They also said it would allow more immigration staff to be tasked with counterterrorism duties ahead of the 2020 Tokyo Olympics.

The gates scan faces and compare the images with the photographic data encrypted on microchips in passports. The gates automatically open if the computer verifies a match. The whole process takes just 15 seconds, the official said.

In response to privacy concerns, the official said the facial image data will be deleted immediately after verification is completed.

There may not be enough of the new gates to go around at first, but it eventually plans to increase the number of gates to 137 from three. The details of the system will be hammered out by the end of next March, the official said.

In addition to Haneda, the gates will be installed at Narita airport, Chubu International Airport in Aichi Prefecture, Kansai International Airport in Osaka and Fukuoka Airport later this year.

In 2007, Japan introduced automated fingerprint gates to fast-track the immigration process. The system, however, is unpopular with both Japanese and foreign travelers: Only 7.9 percent of flyers used the gates in 2016, according to the Justice Ministry.

One reason fingerprint gates haven’t been embraced yet might be that would-be users are required to register their fingerprints with the government in advance. The facial recognition system does not require registration.

Foreign tourism has been climbing since 2011. A record 28.69 million visited Japan last year, up 19.3 percent from 2016, according to the Japan Tourism Agency.

The government aims to increase that to 40 million by 2020 — when Tokyo will host the Olympic Games — and to 60 million by 2030.