Lindsay Lohan is back in jail after she failed a drug test and a judge denied a request to set bail for the young star. But within hours, her lawyer had filed a motion to spring the starlet.

Lohan was taken from a courtroom in Beverly Hills in handcuffs and sent to the nearby Century Regional Detention Center Friday afternoon.

This is Lohan's third jail stint, all of which stem from a 2007 drunk driving case and two other charges relating to drugs and alcohol.

But later on Friday, her lawyer issued documents which challenged the court's authority to hold her.

Lohan, 24, was twice released early from jail because of overcrowding issues at local prisons. Her longest stay so far has been a stint lasting 14-days earlier this summer.

However, Lohan's next appearance in court is set for Oct. 22, and it's unlikely she will be released before then. The hearing next month will centre on a failed drug test.

"She will not get out now," said Barry Gerald Sands, a well-known Hollywood lawyer.

Los Angeles Superior Court Judge Elden S. Fox shot down a request from lawyer Shawn Chapman Holley to release the celebrity on bail.

As Lohan was led out of court, her father Michael Lohan could be heard saying "oh God."

It isn't clear if the star will get credit for time served.

"This isn't a sentence," said court spokesman Allan Parachini. "She was remanded to custody pending a hearing date."

TMZ reporter Nina Parker said that Lohan appeared to be doing better after a few tough years, but this latest saga shows she may need more time to get her life together.

"She's got a new film coming out, she was supposed to do (Saturday Night Live) later this year … this is definitely going to interrupt her work schedule," Parker added.

"Honestly, this kind of looks like what was happening with Robert Downey Jr. years ago when he was in and out of jail," Parker told Â鶹´«Ã½ Channel.

"She's still blaming everyone else for her problems. So until she realizes that she really is at the core of this, I continue to see this happening for months and months; maybe even a year."

With files from The Associated Press