Poland has upped security ahead of the World Youth Day event that will draw hundreds of thousands of pilgrims from around the world to the southern city of Krakow this week.
The Iraqi man was charged in the central city of Lodz and remanded in custody for two months, local court spokesman Pawel Urbaniak told reporters.
"National prosecutors have launched an investigation," he added.
Prosecutor Beata Marczak added that the man was detained last week and charged yesterday with "possessing trace amounts of explosive material," which could result in up to eight years in jail.
More From This Section
Private news channel Polsat News reported that the explosive traces were found on the man's luggage and clothes at hotels in Lodz and Krakow.
It added that the man had been detained at the hotel in Lodz today and had been in possession of notes on preparing terrorist acts against French supermarkets in Poland.
Polsat News described him as a 48-year-old who arrived in Poland a couple of weeks ago after being expelled from Sweden. Earlier he had lived in Switzerland for several years.
Interior Minister Mariusz Blaszczak told reporters today that around 200 people had been stopped from entering Poland in the run-up to the festival.