A man accused of killing three men may have gotten the idea from a 2013 horror movie, police said.

According to NBC News, 19 year-old Johnathan Cruz was arrested on May 17 and charged with felony murder, robbery, criminal gang enhancement and intimidation.

Prosecutors said Cruz chose his victims, Billy Boyd, Jay Higgenbotham and Jose Ruiz, at random during the four-day killing spree and bragged about going on a “purge” before the killings, according to NBC News. The comments were likely in reference to "The Purge" movie, in which all crime is legal during a 12-hour time span once a year, investigators said.

>> Read more trending stories

A social media account allegedly run by Cruz, under the alias Sav Hunna, showed multiple videos and photographs that insinuate gang activity and contain multiple uses of the N-word.

Documents filed in support of the charges against Cruz also contain text messages, including one to a woman believed to be his girlfriend bragging about the killing and telling her to check Facebook for the videos of the crime.