As one of the biggest pop stars in the world, Taylor Swift has amassed many stalkers. Just this fall, she reportedly received a restraining order against a man who had been sending her letters for two years, claiming he was her soul mate, and threading to rape and kill her.

To prevent the musician from coming face to face with her stalkers, Swift's team employed a somewhat controversial solution during her May 18 Rose Bowl show: facial-recognition technology.

According to Rolling Stone, a facial-recognition camera was hidden inside a kiosk playing clips of Swift from rehearsals. As fans approached the kiosk to watch, the camera would stealthily snap their photo. Those images were then compared to a database of Swift's known stalkers.

"Despite the obvious privacy concerns—for starters, who owns those pictures of concertgoers and how long can they be kept on file?—the use of facial-recognition technology is on the rise at stadiums and arenas," the report notes.

Ticketmaster, for instance, recently invested in Austin, Texas-based facial recognition startup Blink Identity, which says its technology can identify 60 people a minute walking at full speed past a sensor, meaning paper and digital tickets may soon be a thing of the past. The same tech can be used throughout a venue to allow concertgoers to purchase drinks, snacks, and merchandise.

Meanwhile, US Customs and Border Protection (CBP) in August started using new facial-recognition technology at 14 early adopter airports. Just days after it was implemented, the system helped identify an imposter who attempted to enter the US with someone else's passport. In the future, the technology may be used throughout the airport security and boarding processes, so travelers are identified via biometrics instead of their boarding pass and ID, CBP said.

This article originally appeared on PCMag.com.