Santos Colon Jr. intended to have a sniper shoot the pope during a papal Mass, while explosives went off in the surrounding area, the U.S. Attorney's Office for New Jersey said.

"Colon engaged someone he believed would be the sniper, but in reality was an undercover FBI employee," the federal prosecutor's office said in a statement.

"Colon engaged in target reconnaissance with an FBI confidential source and instructed the source to purchase materials to make explosive devices," the statement said.

The pope visited Philadelphia on Sept. 26-27 for the World Meeting of Families Congress, drawing huge crowds to the Benjamin Franklin Parkway and other sites.

Colon, also known as Ahmad Shakoor, was initially charged as a juvenile under a sealed complaint, court records show. He pleaded guilty as an adult to attempting to provide material support to terrorists.