Dukes of Hazzard actor John Schneider spent a few hours in a Los Angeles County jail and was released well short of his three-day sentence due to overcrowding.

Schneider was sentenced to three days in a county jail for unpaid alimony.

The 58-year-old actor started his three-day jail sentence on Tuesday for failing to pay spousal support to his estranged wife Elvira Castle.

The sentence began at 10:29am, when the actor checked in to the Los Angeles County Jail, according to TMZ.

Dukes of Hazzard actor John Schneider started his three-day jail sentence on Tuesday for failing to pay spousal support to his estranged wife Elvira Castle

But Schneider was a free man at 3:46pm on Tuesday - having served just over five hours of a total 72-hour jail sentence.

It is common for inmates accused of nonviolent crimes to be released from LA County jail because of overcrowding.

Schneider was ordered by a judge on Monday to serve the brief prison sentence as well as perform 240 hours of community service.

Moments before he handed himself in, Schneider told Fox News that he was 'disheartened with the system' but would hold his head high during his jail time.

Schneider was previously given a March deadline by the court to pay more than $150,000 in delinquent spousal support.

A judge ordered him on Monday to serve the brief prison sentence at Los Angeles County Jail, as well as perform 240 hours of community service. He's seen above as Beauregard 'Bo' Duke in The Dukes of Hazzard, holding a monkey on set

He claimed that he couldn't afford the payments after losing the majority of his money when his Louisiana movie studio was destroyed by floods in March 2016.

'If I had it (money), I would've given it to her just to let this go away but I don't have it,' he said.

'Hopefully this is evidence of that.

'I've worked seven days a week, 80 hours a week, at least since 1978. I have, as every working person has, a mountain of debt that was attached to my dream.

'There's a group now that somehow feels they're entitled to life or even luxury without work and the judicial system apparently agrees with that.'3

Schneider had earlier been ordered by a judge to transfer his property to his estranged wife to pay his spousal support debt and to resolve tax liens against the property.

Earlier this year he was accused in court documents of missing monthly support payments of $18,911 from September 2016 through May 2017.

Schneider was previously given a March deadline by the court to pay more than $150,000 in delinquent spousal support to his estranged wife Elvira

Popular show: Tom Wopat (left) and John Schneider (right) are shown in a promo still circa 1980 for The Dukes Of Hazzard

Castle filed for divorce in December 2014 after 21 years of marriage.

She cited irreconcilable differences in the divorce filing.

The couple married in 1993 and share three adult children, including Leah and Chasen from Castle's first marriage and their daughter Kris.

Castle in her divorce petition seeking spousal report stated that she was a stay at home mother throughout their marriage and did not have the skills to compete in the modern workforce.

Schneider at age 17 won the role of Bo Duke on The Dukes Of Hazzard and starred on the CBS show from 1979 to 1985 opposite Tom Wopat as his older cousin Luke Duke.

He has worked regularly in TV and film since and was a series regular on Smallville and The Mummy before landing a main role in 2013 on The Haves And The Have Nots on the Oprah Winfrey Network.

Schneider also had recurring roles on Dr Quinn, Medicine Woman and the reboot of 90210.