By Kristen Johanson

PHILADELPHIA (CBS) — Lawyers for Philadelphia rapper Meek Mill filed an emergency petition to have him released from prison, and just hours later, the court denied it.

Attorneys asked the Pennsylvania Superior Court to reconsider Philadelphia Judge Genece Brinkley’s decision to put Meek Mill behind bars, but the court denied the motion and referred the case back to the Court of Common Pleas, pointing to the pending bail motion.

The emergency filing is called a Petition for Writ Habeas Corpus, which asks for the higher court to determine if a defendant’s imprisonment is unlawful.

Meek Mill — whose real name is Robert Williams — remains in a Chester prison and has filed a motion to appeal his case in Philadelphia.

The legal battle stems from 2009 gun and drug charges, and multiple probation violations through the years.

Mill’s defense team argues that Brinkley has been inappropriate in court, and asked her to recuse herself.

Brinkley has denied any request for comment.