New York -- A man charged with killing a reputed New York mob boss was deluded by internet conspiracy theories and thought he was helping President Donald Trump defend democracy, his attorney said in court papers filed Friday. Anthony Comello is facing murder charges in the March 13 shooting of Francesco "Franky Boy" Cali, an alleged leader in the Gambino crime family.

In a legal filing, attorney Robert Gottleib said Comello was gripped by an irrational belief that Cali was part of a "deep state" that secretly controls the U.S., and went to the gangster's home on Staten Island with handcuffs with the intention of arresting him.

"Mr. Comello became certain that he was enjoying the protection of President Trump himself, and that he had the president's full support," Gottlieb wrote in court papers obtained by The New York Times.

Get Breaking News Delivered to Your Inbox

During the encounter, though, Cali was shot multiple times.

Gottlieb said he planned to submit evidence to support his contention that Comello should be in psychiatric treatment because of his mental state, not prosecuted.

At an early court appearance following his arrest, Comello displayed writing on his hand that included the letter "Q," which is associated with QAnon, a conspiracy theory that suggests a "deep state" plot against Trump.

Anthony Comello displays writing on his hand during his extradition hearing in Toms River, N.J., on March 18, 2019 Seth Wenig / AP

"Mr. Comello's support for 'QAnon' went beyond mere participation in a radical political organization," Gottlieb said. "It evolved into a delusional obsession."

Comello also once tried to arrest Mayor Bill de Blasio at his official residence, Gracie Mansion, but was turned away by police, and was asked to leave a federal courthouse last winter after saying he was there to arrest U.S. representatives Maxine Waters and Adam Schiff, both California Democrats.

Previously, police sources told CBS New York it appeared Comello acted alone, angry that Cali didn't want him to date his niece.

Police sources say Comello was a hot-head and a marijuana user who had a crush on the victim's niece, and he was angry that Cali told him he wasn't good enough for her.

The last Mafia boss to be rubbed out in New York City was Gambino don "Big Paul" Castellano, who was assassinated in 1985.