The fire-loving college philosophy teacher who allegedly planned to set St. Patrick’s Cathedral ablaze was indicted Tuesday in connection to the plot, according to Manhattan prosecutors.

Marc Lamparello, 37, has been held at Bellevue Hospital since his arrest for the bizarre April 17 arson attempt, and a court-appointed psychiatrist has found him mentally incompetent, his lawyer, Chris DiLorenzo, disclosed in court.

Lamparello, of Hasbrouck Heights, New Jersey, wore an orange jumpsuit and stood silently beside his lawyer during the brief hearing in Manhattan Criminal Court. His parents and sister watched from the gallery.

Assistant District Attorney David Stuart said his office would review the results and determine how to proceed with the case.

The ex-Lehman College professor is accused of hauling two sloshing cans of gasoline into the iconic church — just two days after a fire ripped through Notre Dame Cathedral in Paris, destroying the spire and damaging the roof.

An usher ordered Lamparello to leave, then flagged down nearby cops, who arrested him.

Stuart previously said it was clear that Lamparello intended to “burn down St. Patrick’s Cathedral.”

DiLorenzo said his client suffers from schizophrenia and was off his medication when he showed up at the Fifth Avenue church.

The deranged doctoral candidate had exhibited other strange behaviors in recent months, DiLorenzo said.

He showed up at the gates of the White House in January, according to the lawyer, “to talk to the president and [aide] Kellyanne Conway about stressing the need to do the ‘State of the Union’ speech during the government shutdown.”

The stunt prompted a Secret Service investigation into Lamparello.

A month earlier, Lamparello personally went to the Hasbrouck Heights police station to complain about people and helicopters following him, DiLorenzo said.

Lamparello’s sister, Lee Nelms, told reporters, “He’s not a criminal. He needs mental health treatment.”

Judge Jonathan Svetkey adjourned the case to June 7. Lamparello has been remanded.