A man flying from Newark Airport to the Dominican Republic was stopped by TSA agents from bringing several smoke grenades onto the flight Sunday, authorities said.

TSA agents at an airport checkpoint x-rayed the man’s bag and determined it needed further inspection, the agency said in a press release.

When agents pulled the bag off a conveyor belt and looked inside, they spotted the six smoke grenades, which are legal but not allowed on flights.

The man passed them off to his friend who was not flying that day and caught his flight to the Dominican Republic, authorities said.

“It’s quite shocking that someone thought he could bring them on the plane at all because something like that is not even allowed in a checked bag,” Christopher Murgia, TSA’s New Jersey deputy federal security director, said in a statement.