A facial recognition system using artificial intelligence will be used at the 2020 Tokyo Olympic and Paralympic Games as part of the effort to ensure the safety of athletes, spectators and officials, NEC Corp. said Tuesday.

More than 300,000 athletes and games staff will submit their facial photographs before the event to have them recorded in a database. Identification cards containing IC chips will automatically verify the identity of those entering over 40 venues, the Japanese electronics maker said.

The Tokyo Olympics will be the first games to have this kind of security system using facial recognition technology, the company said. While the system will not be used for spectators, it is aimed at strengthening security and preventing terrorism, as well as shortening waiting times to lower athlete stress.

In past editions of the games, a great amount of time was spent on security checks as guards had to visually inspect each ID card. The new system is designed to more effectively block entry using borrowed, fake or stolen ID cards, it said.

For spectators, X-ray and metal detectors will be employed to check for weapons and hazardous materials, according to the organizing committee of the Tokyo games.

NEC's facial recognition technology has already been used at overseas airports and elsewhere. The electronics maker also tested the system during the 2016 Rio de Janeiro Olympics and Paralympics at a facility used by Japanese media outlets.