Getting stopped by the cops? Siri can be on your side.

A Siri Shortcut called "Police," introduced in September 2018 for users of Apple's iOS 12, allows you to secretly record interactions with law enforcement by simply speaking a command to Siri such as, "Hey Siri, I'm getting pulled over."

A Reddit user in Arizona, Robert Petersen, created the shortcut and made it available to the public; he has made some updates to it since. Once the app receives a verbal command, it goes into Do Not Disturb mode, turns down brightness, pauses sound or video and sends a message to a pre-selected contact letting them know where you are and that you've been pulled over. You can then press the record button to start filming a video of the encounter. Once the recording is stopped, it is sent to the chosen contact and the phone's functions return to normal.

Get Breaking News Delivered to Your Inbox

"It's one of those things where 99.9% of the time you won't ever need it, but for the 0.1% it could be a very huge help to have a recording of an improper police interaction," Petersen told CBS News.

Petersen said he personally hasn't had bad experiences with police, but he was "keenly aware that others have, particularly among minority groups."

"I just wanted a way for anyone to have proof of their version of events in the unlikely scenario that something unexpected happens during a police interaction," he said. "And if 1 in 10,000 people find my Shortcut useful at all I'd be glad."

This is one of the first Siri Shortcuts allowing users to covertly record cops, although there are also apps that serve a similar purpose.

The American Civil Liberties Union released an app the year before called ACLU Blue, which lets users record police encounters and then send them for review to be posted on a public YouTube channel for the app. This expanded on another ACLU app, Mobile Justice, which sent footage to ACLU lawyers who offered legal advice.

The ACLU says it is legal to record police in any public space if you are lawfully present. Officers are not allowed to delete your footage for any reason, and cannot confiscate or demand to view footage without a warrant.