A man carrying a machete tried to enter Iranian President Hassan Rouhani’s office in Tehran on Monday, the country’s Tasnim News agency reported. Security guards detained the intruder after shooting him in the leg.

Tehran’s Deputy Governor for Security Affairs Mohsen Hamdani said that the intruder was trying to pass the entrance of the presidential office without heeding the warnings of security guards. He was arrested and an investigation is underway.

The incident took place around 11 am local time (1 pm Indian Standard Time), Reuters reported. The agency said that Rouhani did not seem to be at his residence at the time.