NEW YORK — The college philosophy teacher accused of entering St. Patrick’s Cathedral in Manhattan with gasoline cans, lighter fluid and butane lighters had also booked a hotel just 20 minutes from the Vatican, a New York prosecutor said Wednesday.

Police previously said that Marc Lamparello had booked a flight to Rome for the next day.

Assistant District Attorney David Stuart said during a brief court hearing that Lamparello was “planning to burn down St. Patrick’s Cathedral” when he was arrested last week.

The prosecutor made no further remarks about the Rome plans but referred to Lamparello as a flight risk. He said Lamparello had spent “considerable time planning and surveilling” St. Patrick’s before his arrest.

Lamparello told police his vehicle had run out of gas and that he was “taking a short cut through the church,” according to a charging document made public Wednesday.

The document says Lamparello was stopped by a church employee upon entering the cathedral. The employee told police that he saw gasoline spill out of one of the canisters Lamparello was holding.

An email was sent to Lamparello’s defense attorney seeking comment.

Lamparello, 37, of Hasbrouck Heights, New Jersey, made his initial court appearance from a hospital. The judge ordered him to undergo a psychiatric evaluation.

The New York incident happened just days after flames ravaged the Notre Dame Cathedral in Paris, a blaze investigators believe was most likely caused by an electrical short circuit.

Stuart noted during the brief hearing that Lamparello faces up to 15 years in prison if convicted of attempted arson and reckless endangerment.

He indicated that prosecutors will seek to have Lamparello held on $500,000 bond pending trial.

Lamparello has worked part time at New York City’s Lehman College and as an adjunct professor at Seton Hall University in New Jersey.

Police in Newark arrested Lamparello two nights before the St. Patrick’s incident after he allegedly refused to leave the Cathedral Basilica of the Sacred Heart at closing time after a late Mass.