[What you need to know to start your day: Get New York Today in your inbox.]

The philosophy teacher charged last week with carrying gas cans and lighter fluid into St. Patrick’s Cathedral had a clear plan, prosecutors say, to set the Fifth Avenue landmark ablaze.

The man, Marc Lamparello, had also booked a one-way flight to Rome — and a hotel room within a 20 minutes’ drive of the Vatican, a prosecutor told a judge on Wednesday.

“He was present at the church the day before,” the prosecutor, David Stuart, told Judge Kevin McGrath during a video arraignment in Manhattan criminal court. “And was present at the church for more than an hour before walking in that night.”

His intent? “To burn down St. Patrick’s Cathedral,” Mr. Stuart said.

Mr. Lamparello, a 37-year-old graduate student and philosophy teacher, watched Wednesday’s proceeding over a closed-circuit video link to Bellevue Hospital Center, where he sat in a hospital gown next to his lawyer, Christopher DiLorenzo.