Lindsay Lohan walks in and out of jail

Lindsay Lohan was released from a Los Angeles County jail early on Monday, less than five hours after she arrived at the crowded women's lockup to serve a 30-day sentence for violating probation.

The actress was booked into the Century Regional Detention facility at 8:48pm, local time on Sunday, in what was expected to be a short stay because of jail overcrowding.

She was released at 1:35am, county sheriff's spokesman Steve Whitmore said.

Lohan did not get any favours, Whitmore said.

'She's treated like every other inmate who has gone through similar circumstances,' he said.

Lohan had until Wednesday to report to the jail.

It's Lohan's fifth jail sentence since being arrested twice for drunken driving in 2007.

A judge last week ordered jail time because Lohan recently violated court orders by getting kicked out from a community service assignment at a women's shelter.

The judge told Lohan that she will have to perform all of her community service at the county morgue or risk serving an additional 270 days in jail.

Lohan will have to serve 423 hours at the county morgue, where for nearly two weeks she has been mopping floors, cleaning bathrooms and washing dirty sheets.

The sentence also requires Lohan to undergo psychotherapy sessions and appear monthly at court hearings between December and March.

The judge said Lohan can no longer leave the US and needs the permission of her new 'no-nonsense' probation officer to travel outside California.

Jail overcrowding has led to significantly shortened jail terms.

In 2007, Lohan spent 84 minutes at the jail before being released, and in the past she has served about 20 per cent of her sentence, which is roughly six days.

'The longer the sentence, the longer you stay in jail,' Whitmore said.

'As pathetic as it sounds, this is not necessarily special treatment,' said Adam H Braun, a defence lawyer who was not involved in the case. 'It just depends how full the jail is ! when som eone surrenders. If it is filled to capacity or nearly full, offenders like her are the first ones let go so more serious offenders can be held.'

'Even so, she was not likely to do more than 20 per cent of the 30 days under the jail crowding formulas being used because her offence was not a crime of violence,' he added in an email.