Actor Robert Downey Jr. was just hitting his stride in the 1990s. In 1992 he got an Oscar for playing Charlie Chaplin in Chaplin. In 1994 he smashed it in Natural Born Killers. Then in 1998, he gave a bravura performance in The Gingerbread Man.

There had been whispers of his drug use. Reportedly then-girlfriend, Sex and the City's Sarah Jessica Parker broke up with him in the early 90s because of his addiction. But "you know what" hit the fan in 1996 when the Los Angeles Police Department stopped him and found him in possession of a gun, cocaine and heroin. A series of arrests and court appearances landed him in a series of increasingly severe rehab programs. He usually bailed. Then, out on probation, he failed to turn up for drug tests so often that in 1999, a California judge sentenced him to 3 years in prison.

Downey in shackles and dressed in prisoner orange was hauled off and became Inmate No. P50522 in a bleak California 4-men-to-a-cell prison in the middle of nowhere.

He has said that when he walked into the place in handcuffs he was not so much afraid, as he was in total shock. At first, he isolated himself as best he could from other inmates, gradually opening up and forming, if not friendships, then bonds.

Was there violence? Yes. Was he sexually assaulted? Maybe. Maybe not. He was given menial jobs, mandated to go to drug rehab classes, and received famous visitors like super-rich actor, Sean Penn.

Let's have a look at Robert Downey Jr.'s time in prison.

Life Inside

Downey was assigned to a four-man cell. As "last man in", he got shouted at for things like spitting his toothpaste out in the sink (instead of the toilet) and was relegated to the dreaded top bunk. It's hard to imagine dealing with the toilet needs of four men in a cell, let alone the close proximity and irritations that broke out.

RELATED: 10 Things You Didn't Know About Robert Downey Jr.

It was quite a shock for him. At one point, he had a bit of an altercation with a cell-mate and was sent to solitary confinement, as much to protect him as punish him. Some inmates resented the "famous" actor and made accusations of favoritism. Downey denied this, saying that it was not in his or the prison's best interest to foment discontent.

Far from it. Robert has said that the assistant warden had said to him upfront: "If we have any discipline problems with you, we’re going to come down on you like a ton of sh**.” He got it.

Of course, journalists asked point-blank about sexual assault. At first, he prevaricated then flat out denied he had been assaulted.

A Leaner, Meaner Downey

Downey claimed he remained clean and sober during his time inside. Still, some wondered. What is true to say is that the actor never failed one of the prison's random drug tests.

He was leaner and meaner than he had been in years. He lost weight and played racquetball with other inmates. There was one occasion when his on-court opponent took exception to something Downey Jr. had done. There was a bit of a pushing and shoving match, from which neither man backed down. A third inmate broke it up.

And that event was very telling. Robert Downey Jr. apparently gave as good as he got in prison. When a run-in with a cellmate resulted in the guy being transferred out of the cell, another cellmate got into Downey's face about the incident. He stood him down, saying he could forget trying to do his head in. It wasn't going to happen. Even then, there was a bit of 'Iron Man' in the actor cum inmate.

RELATED: Fans Think Robert Downey Jr. Is Just Like Tony Stark, Without The Iron Suit

Dealing With Boredom And Mundane Labor

Downey Jr. had visitors. Journalists from places like Vanity Fair were clamoring for interviews. His estranged wife Debbie occasionally visited with their son, 6-year-old Indio. Tragically, later in life, Indio developed drug addiction issues. Friend and actor Sean Penn rolled up on occasion.

And just for a bit of fun "Mo", as he was called inside, joined the inmate Christmas choral group.

At first, Robert was assigned 4-hour kitchen shifts. He hated everything about it, from slopping out the trash-strewn kitchen to dealing with mundane jobs like peeling potatoes. But it did pass the time, as did mandatory drug rehab classes.

And he wrote lots of letters to friends and family. Women he didn't even know wrote to him and, bored to tears, he would sometimes write back.

And he journaled his experiences.

A Second Chance

Downey Jr. got out on appeal in 2000. But, as far as Hollywood was concerned, Robert Downey Jr. was canceled. His career and probably his life were saved by Mel Gibson. Robert couldn't get acting jobs without insurance. And bonding companies wouldn't insure him. Mel Gibson stepped up to the plate and put down the insurance money himself. That enabled Downey Jr. to make The Singing Detective in 2003. He was up and running at last.

RELATED: Does The "Mel Gibson And Robert Downey Jr." Bromance Still Exist?

And the rest, as they say, is history. Downey Jr. appeared in a string of okay movies until in 2008 his turn as Tony Stark in Iron Man once again made him a major star.

And these days? Divorced from his first wife Deborah Falconer, Downey Jr. is now married to his "life-saving" second wife, producer Susan Levin. And he's the proud dad of son Exton and daughter Avri.

And he says he's clean and sober. These days? Most people believe him.

NEXT: Robert Downey Jr. And Other Actors Talk About Working On "Iron Man" Films