A man armed with a sharp weapon injured two police personnel outside the Gorakhnath temple in Uttar Pradesh’s Gorakhpur district on Sunday when he attempted to forcibly enter the premises, the Hindustan Times reported.

Security personnel overpowered the man, Ahmad Murtaza Abbasi, after about 10 minutes. Abbasi also sustained injuries in the incident.

The two policemen who sustained injuries are constables Gopal Gaud and Anil Paswan.

Gaud told Aaj Tak that the two policemen were stationed at the main gate of the temple when the man attacked them. He added that the man was holding a “large knife which is used to cut coconuts”.

Deputy Inspector General of Police (Gorakhpur Range) J Ravinder Goud visited the site of the attack on Sunday.

The temple where the attack took place forms part of the Gorakhnath Mutt, of which Uttar Pradesh Chief Minister Adityanath is the head priest.

Videos of the incident show the man, wearing a purple shirt and jeans, brandishing a knife and attacking police personnel and other people.

The police said that the attack may have been an act of terrorism and that they would look at the possibility of a larger conspiracy, according to NDTV. “Items recovered from the person makes it seems a big conspiracy was in play and we cannot deny that this could have been a terror attack,” Additional Director General, Law and Order, Prashant Kumar, said.

The man has been charged with attempted murder and promoting enmity on the basis of religion.

The police said that Abbasi graduated from the Indian Institute of Technology-Bombay in 2015.

His father, Munir Murtaza, claimed that he had been suffering from depression since college, and had suicidal tendencies. “He used to be constantly ill,” he said, according to NDTV. “He used to take unscheduled leaves at work. When I retired, I brought him back to Gorakhpur because he used to be mentally depressed.”