A day after a murder-accused was shot dead inside a courtroom in the northern Indian state of Uttar Pradesh, authorities have suspended 18 policemen for dereliction of duty, police said Wednesday.

"Eighteen policemen including a station in-charge were suspended in a case pertaining to the firing incident inside a courtroom that led to the killing of a murder-accused," a senior police official told media. "The policemen have been suspended for dereliction of their duty."

On Tuesday afternoon three men took out pistols and resorted to indiscriminate firing, killing the under-trial at the courtroom of Chief Judicial Magistrate in Bijnoor district, about 441 km northwest of Lucknow, the capital city of Uttar Pradesh.

The under-trial was a murder suspect involved in the killing of two people including a local leader of a regional party.

Reports said the shootout took place when the accused was being produced in front of the Chief Judicial Magistrate. The intensity of firing made those present, including the judge, inside the room to duck for cover. A policeman and a court staff were reportedly wounded in the shootout.

All the three persons were arrested by police following the shootout and one was identified as a son of the slain local leader.

Police viewed the attack as a revenge killing.