Releasing an accused from jail on "oral instruction" from a magistrate despite the top court order cancelling the bail gave tough time to a jail superintendent of Uttar Pradesh on Monday before the Supreme Court which said the person responsible for this would "pay the price".

The top court stated this after the superintendent of Gautam Buddh Nagar district jail in Uttar Pradesh appeared before it and revealed that he had released the accused from jail on oral instruction of a magistrate, who had visited the prison.

Terming it as "very odd" and "strange", a bench headed by Justice N V Ramana said, if needed, the top court might order inquiry against the concerned magistrate.

"It is very odd that he (jail superintendent) did it on oral instruction of magistrate," said the bench, which also comprised justices Sanjiv Khanna and Krishna Murari.

"It is strange. There was order of this court staying his (accused) release from the jail," the bench said.

At the outset, Solicitor General Tushar Mehta told the bench that the jail superintendent has appeared in the court in compliance of its order.

"What compliance? They do not comply with the orders of this court. He (superintendent) says that he has done it on oral instruction of the magistrate," the bench said.

"The magistrate orally says that release him (accused) and he does not even bother about the Supreme Court order. He has to face it," the bench said.

"In this case, we may have to order an inquiry against the judge who orally said this," it added.

Mr Mehta said that as the magistrate, who visited the jail, asked the superintendent to release the accused, the officer did it. He also produced the jail book before the bench.

"Suppose some magistrate come to jail and say release an accused, who is a terrorist, will the jailor release him," the bench observed.

Terming it as a "serious matter" the top court asked both the parties to file documents, if needed, and posted the matter for hearing in November.

At the fag end of hearing, Mr Mehta told the top court that the accused, who was released from jail, was presently lodged in the prison.

Earlier, the top court had issued a non-bailable warrant (NBW) against the jail superintendent while admitting a contempt petition filed against him.

The bench had passed the order while hearing a contempt plea filed by a man who had earlier approached the top court challenging the Allahabad High Court order granting bail to the accused in a criminal case.

The top court had in July last year directed the Uttar Pradesh government not to release the accused from jail, if he was still under custody, until further orders.

Later, on December 3, 2018, the top court had set aside the high court's order granting bail to the accused.

In his contempt plea, the petitioner has said that after the order in December last year, the jail superintendent sought a new jail custody warrant for the accused from the trial court.

The contempt plea said that without waiting for custody warrant, the jail superintendent released the accused from prison.

The petitioner has alleged that the jail superintendent "willfully, illegally and arbitrarily" released the accused from jail in "total dereliction" of duty despite the top court's order by which the bail granted to him by the high court was cancelled.

He has said that when the trial court concerned came to know that the accused has been released by jail authorities despite the top court order cancelling his bail, the trial judge issued a NBW against him but he has not been arrested yet.

The petitioner has alleged that after the accused came out of jail, he had attempted to kill him and the police was not registering a complaint in the matter.