A former department head at Russia’s federal prison service shot himself dead in a courtroom on Wednesday after being handed a three-year sentence on corruption charges.

Local court and investigative officials at Moscow’s Chertanovsky court said Viktor Sviridov took out his pistol and fatally shot himself in the head moments after hearing the verdict and being remanded to custody.

Police are now looking into how Sviridov was able to bring the alleged service weapon into the building. Officers are reportedly investigating court security following the shooting, Russia’s RIA news agency said.

Sviridov was convicted of extorting 10m roubles (£121,000) from the federal prison service’s former deputy director.

He pleaded guilty to the charges and his lawyers asked the judge not to send him to prison.

He had been told not to leave Moscow and came to attend the sentencing from home, where he was under house arrest.

Sviridov’s lawyer, Grigory Ivanishchev, told Interfax news agency that his client expected a not guilty verdict and “did not have suicidal tendencies”.

He added: “The court ignored the serious illness. I associate this [suicide] with the court’s decision.”