Marc Lamparello’s story seemed off from the start.

It was nearly 8pm on Wednesday when Mr Lamparello, a 37-year-old graduate student and lecturer on philosophy, entered St Patrick’s Cathedral in midtown Manhattan toting two gasoline cans, lighter fluid and lighters, police said.

Hours before, he had purchased a $2,800 (£2,150), one-way plane ticket to Rome, which was set to depart the next day.

Mr Lamparello was about 20 feet into the church when ushers approached him and said he could not be inside the building with the cans of gasoline, police said.

He explained that he was trying to take a shortcut through the iconic sanctuary to reach his van, which he claimed had run out of gas.

Notre Dame fire: Global tributes Show all 5 1 /5 Notre Dame fire: Global tributes Notre Dame fire: Global tributes Fenice theatre, Venice The Fenice theatre in Venice illuminated with the colors of the French flag EPA Notre Dame fire: Global tributes The dome of the Chapel of the Shroud, Turin The dome of the Chapel of the Shroud in Turin illuminated with the colors of the French flag EPA Notre Dame fire: Global tributes One World Trade Centre, New York City One World Trade Centre is lit in the colors of the French flag in solidarity with the people of France REUTERS Notre Dame fire: Global tributes Stari Most bridge, Mostar The Stari Most bridge in the Bosnia and Herzegovina city of Mostar lit in colours of the French flag AFP/Getty Images Notre Dame fire: Global tributes Empire State Building, New York City Empire State Building is lit in the colors of the French flag in solidarity with the people of France REUTERS

Mr Lamparello’s gold minivan, though, turned out not to be out of fuel, police said, and a stroll through St Patrick’s was hardly a shortcut.

Denied entry, Mr Lamparello left the sanctuary, sloshing gasoline on the floor as he went, police said. He was stopped outside the church by police officers, who noticed the twin gas cans.

The incident came just before Easter and two days after a devastating fire tore through the Cathedral of Notre Dame in Paris.

Mr Lamparello, who has addresses in New Jersey and in Brooklyn, was taken into custody on Wednesday night and questioned by detectives, including officers from the Police Department’s intelligence division and the Joint Terrorism Task Force.

He was being held on charges of attempted arson and reckless endangerment, senior police officials said.

But on Thursday afternoon, he was transported from the Midtown North Precinct to Bellevue Hospital for a psychiatric evaluation, police said, and it remained unclear when he would appear in court.

It was the second church-related arrest this week for Mr Lamparello.

On Monday night, he was arrested inside Newark, New Jersey’s Sacred Heart Cathedral after he refused to leave the sanctuary.

He told officers the church was a house of God and should be open at all hours before throwing himself on the floor and vowing to stay.

“[He] said, ‘If you want me to leave, you’ll have to take me out in handcuffs',” Armando B Fontoura, the Essex County sheriff, said. He described Mr Lamparello as “very respectful”, if obstinate.

Remarkable footage shows firefighters battling Notre Dame flames

Mr Lamparello was taken to a police station that evening and charged with resisting arrest, defiant trespassing and interfering with the administration of law.

He was evaluated by emergency medical technicians, who found nothing wrong with him, Sheriff Fontoura said.

His mother escorted him that night from the precinct to his parents’ home in Hasbrouck Heights, New Jersey, he said.

It remains unclear what may have driven Mr Lamparello to go to St Patrick’s Cathedral on Wednesday. Police officials would not say what, if any, motive he disclosed to officers.

“There doesn’t appear to be any connection to a terror group,” said John Miller, the Police Department’s deputy commissioner of intelligence and counterterrorism.

Mr Lamparello is a doctoral candidate in philosophy at the City University of New York. His mother told New Jersey authorities he had an apartment in New York City.

He was a 2004 graduate of Boston College and was listed as teaching courses at Brooklyn College this spring. Police said Mr Lamparello also taught at Seton Hall University in New Jersey.

He had written and published a book, Reason and Counterpoint, in 2016. His online biography on Amazon.com suggests an interest in questions of religion and higher powers; it said he was working on a book-length project that would wrestle with the existence of God.

At least one of the courses he has taught, Introduction to the Problems of Philosophy, touched on religion.

The course included “such topics as the nature and scope of knowledge, meaning and verification, the existence of God, determinism and free will, the mind-body problem, and the nature of moral judgments,” according to an online course description for Brooklyn College.