In an unusual courtroom drama in Japan's Sendai District, a man facing trial for allegedly taking obscene pictures of a girl from under her skirt stabbed two police officers on Friday (16 June).

The accused, Seiji Yodogawa, 30, reportedly shouted, "what a rotten justice system" before slashing the two policemen's faces with a hidden knife, AFP news agency reported. He now faces attempted murder charges.

The shocking incident unfolded just as the judge at the Sendai District Court in Miyagi Prefecture was about to deliver his verdict in the ongoing trial. The accused first began moving through the gallery of the courthouse towards the exit and when the two officers tried to restrain him, he attacked them, according to Japan's public boradcaster NHK.

The two policemen sustained non-life threatening injuries from the encounter and were being treated at a hospital.

A search revealed that the accused was carrying three fruit knives and two box cutters. Sources told the broadcaster that his belongings were not searched before he entered the courtroom because he was out on bail in the upskirt images case.

A court spokesman told AFP that the original case against Yodogawa had been temporarily suspended since the verdict was not fully read during the trial. He was currently in police custody and will be tried for attempted murder.

The original case was regarding allegations that the man secretly took pictures of a girl from under her skirt while they were travelling in a train in Sendai. It was not clear when the original case was filed.