Victoria Police is being accused of defying magistrates' rulings and misusing the state's new night court system in an effort to keep a man behind bars.

Key points: The concerns were raised after a man was held unlawfully for a week in Melbourne

The concerns were raised after a man was held unlawfully for a week in Melbourne Lawyers say police are taking advantage of delays in the court system

Lawyers say police are taking advantage of delays in the court system Victoria Police said that it was considering its legal options

The concerns come after a Melbourne man who was unlawfully imprisoned following a ruling by a magistrate in Victoria's new "night court" was released by a Supreme Court judge.

Kyle Stewart was unlawfully held by police for a week on an unlicensed driving charge.

After an initial magistrate's decision that he should be released, police held Mr Stewart for another nine hours in the cells at Sunshine Magistrates Court, then took him before the new Night Magistrates Court, where a different magistrate remanded him in custody.

A subsequent hearing the next morning extended Mr Stewart's stint in the cells.

Mr Stewart was released from custody late on Wednesday night after a Supreme Court judge ruled police had defied a suburban magistrate's order to release him on March 8.

As a result, he had been illegally held in custody for a further seven days.

Lawyers accuse police of 'forum shopping'

The new night court was set up in the wake of the Bourke Street massacre, after it was discovered the alleged killer had been released on bail by a volunteer night time bail justice shortly before the deadly rampage.

Got a confidential news tip? Email ABC Investigations at investigations@abc.net.au For more sensitive information: Text message using the Signal phone app +61 436 369 072 No system is 100 per cent secure, but the Signal app uses end-to-end encryption and can protect your identity. Please read the terms and conditions.

In response to the public outcry, the State Government pledged full-time magistrates would be available at night.

In a hearing in response to an urgent application by Mr Stewart's lawyers last Friday, Mr Stewart's barrister, Louis Richter, told Supreme Court Justice Kate McMillan police had been "forum shopping" to find a court that would keep Mr Stewart locked up.

Mr Richter compared the situation to "North Korea or Iran".

However, Justice McMillan said she was unable to make a decision without hearing a recording of the original hearing in Sunshine Magistrates Court, in which Magistrate Kaye Robertson said Mr Stewart should be released. It took another five days for Justice McMillan to rule on the case.

In the ruling, Justice McMillan said Magistrate Robertson made it clear the warrant which allowed police to hold Mr Stewart expired at the end of the day.

"Magistrate Robertson refused to make a further order in respect of the remand of [Mr Stewart]," Justice McMillan said.

"At that time, there was no lawful basis upon which to keep the plaintiff in custody … I am satisfied that the actions of police in continuing to hold the plaintiff in custody after his hearing before Magistrate Robertson at approximately 10.35am on 8 March, 2017 was unlawful."

Mr Stewart's lawyer, Anna Balmer said her client's case raised serious questions about the powers of police to hold prisoners in a custodial system where delays were common.

"This matter has highlighted a serious issue being that every day across the state of Victoria accused persons in custody are not being brought to court despite there being a court order requiring that person to appear," Ms Balmer said.

"As a practitioner who appears in court on a regular basis, it is apparent that all parties including the judiciary are frustrated with the current situation in relation to persons on remand."

Victoria Police said it was considering its legal options.