An Additional District Magistrate (ADM) was injured after being assaulted with a cricket bat in Ghaziabad on Sunday, police said.
The attacker identified as Jasbir Singh, a former army man, has been detained.
Madan Singh Garbyal was out for a walk when he was attacked at around 7 pm, District Magistrate Ajay Shankar Pandey told reporters.
"The attack took place in Vishwanath Park in sector 14 in Raj Nagar. The ADM was attacked with a (cricket) bat and has received injuries on his head and face. He has been kept in the intensive care unit (ICU) but is out of danger," he said.
According to the DM, Mr Singh was dismissed from the army in 1995 after being court martialled.
"He (Singh) worked as a bouncer in a mall but lost his job... it appears that he is mentally unstable," Mr Pandey said.
Senior Superintendent of Police (SSP) Ghaziabad, Kalanidhi Naithani said they were probing the reason behind the attack.