A Pennslyvania man was arrested for causing "mass panic" at a Walmart in New York last year when he and a group of men staged a fight inside the store for a social media prank video, police said.

Marcquis Graham, 24, of Philadelphia, was taken into custody in Ronkonkoma, Long Island, on Thursday and charged with riot, unlawful assembly, criminal nuisance, reckless endangerment and endangering the welfare of a child.

Suffolk County police said that on Dec. 2, 2018, Graham and four other men "staged a violent altercation" inside a Walmart in Commack. The men "yelled about a shooting" while filming the video, police said in a press release.

The fake fight caused "mass panic throughout the store," the release stated, adding that the prank video was going to be posted online for "shock value."

At the time, shoppers said they heard what sounded like gunshots and someone yelling about a gun, according to The Associated Press. Panicked customers scrambled to leave and some called 911 to report a possible shooter.

Officers from Suffolk County and the New York state police force responded, and the store was evacuated, a county police spokesman said.

Graham was arraigned on the charges and released from jail on bail, the AP reported. He is being represented by the Legal Aid Society in Suffolk County, which could not immediately be reached on Saturday afternoon. Online court records show Graham has not yet entered a plea.

Suffolk County police said it could not comment on whether more arrests will be made, citing the ongoing investigation.