Shetty, in his early 70s, was rushed to a nearby hospital where doctors treated him for the stab injuries and said he was in a 'stable' condition in the critical care unit.
He was brought to the hospital around 2 pm with multiple stab injuries and taken to the operation theatre where a team of doctors "tackled all of it," Dr Divakar Bhat of Mallya Hospital told reporters.
"We have managed to stop it and the patient is now in the critical care unit. He is now stable, there is nothing to worry or fear," he added.
While Chief Minister Siddaramaiah rushed to the hospital soon after the incident, Union Home Minister Rajnath Singh spoke to him later and expressed concern over the attack.
Also Read
Officials in New Delhi said Siddaramaiah apprised Singh about the incident and the condition of the Lokayukta.
They added that the home minister wished Justice Shetty a speedy recovery.
Sharma was arrested, Siddaramaiah told reporters after he rushed to the hospital and enquired about Shetty's condition.
He said Sharma, who had filed a complaint with the Lokayukta about not getting a tender for a work he had applied for, went to his chamber and stabbed him at three or four places.
The man was told by the Lokayukta office that the case was shut after investigation.
"I have spoken to doctors regarding his treatment. Doctors who are treating him have said prima facie he is out of danger," the Chief Minister said.
"I was shown the weapon. The knife is big. It looks like he has attempted to murder," he said.
"I wish for his speedy recovery. Such a thing had never happened... I have instructed the DGP to investigate in detail... about his background and other things."
Amid reports of a security breach, Siddaramaiah said he had asked police to look into it and take action.
He said those who come to meet the Lokayukta are normally given a chit before being called in.
The gunman was standing guard outside Shetty's chamber and the CCTV is also installed, Siddaramaiah said, adding, "... He did this inside the chamber."
He said Sharma went alone inside the Lokayukta's chamber.
State Home Minister Ramalinga Reddy, citing initial information, had earlier said the assailant had claimed to be an advocate.
Shetty took over as the state Lokayukta in January 2017 succeeding Y Bhaskar Rao, a former high court chief justice.
Disclaimer: No Business Standard Journalist was involved in creation of this content