Under oath in a court-ordered deposition, RYAN O’NEAL admitted ex-lover FARRAH FAWCETT caught him in bed with another woman at his Malibu home.

The Charlie’s Angels star then unceremoniously cut Ryan out of her life, in an act of revenge, he testified as part of a lawsuit filed by the University of Texas seeking to force O’Neal to give up to them a one-of-a kind Andy Warhol painting of Fawcett. The university claims that the actress’ left it to them in her will, but O’Neal says the painting has always belonged to him.

But during a videotaped deposition in the painting lawsuit, O’Neal was forced to make a stunning admission about cheating on his long-time lover, who passed away June 25, 2009.

DOCUMENTS: Read Ryan O’Neal Deposition Confession About Cheating On Farrah

O’Neal was questioned about by University of Texas attorneys about his 1997 affair with actress Leslie Stefanson, then in her twenties.

“You and Miss Fawcett had a falling out in February of 1997, correct?” a lawyer asked the “Love Story,”  pressing him to detail the sexual rendezvous.

 “Yeah. We did,” O’Neal answered.

The lawyer added, “I’m not prying, but… Miss Fawcett found you in the Malibu home in bed with another woman?”

“She did,” O’Neal responded.

O’Neal’s cheating is relevant to the case because the university is trying to establish that Farrah – not Ryan – owned the painting and left it to the university in her will.  What happened to the painting after Fawcett caught O’Neal cheating with Stefanson became a crucial point.

O’Neal’s honesty about his tumultuous love life with Fawcett is documented in hundreds of pages of deposition transcripts, exhibits and papers filed in a Los Angeles court almost four years after the “Charlie’s Angels” star lost her battle with cancer.

“Do you recall that shortly after this incident that occurred in the early morning of February 18th, 1997 that the portrait… went from your home in Malibu over to Miss Fawcett’s home,” one University of Texas lawyer asked O’Neal, in the deposition.

“Not for another year,” he responded. “The reason I gave it to her is because there was a new woman in my life and the painting was making her uncomfortable; that Farrah seemed to be staring down at her. And so I said, ‘Well, I can fix that.’

 “I took it to Farrah and said, ‘Keep this for me. I’ll be back.’”

According to O’Neal, Fawcett told him she didn’t want take back possession of the Warhol because she wanted it to remain in his beach mansion, in a calculated move to make his girlfriend uncomfortable living there.

“I don’t want it because I like it that she’s uncomfortable,” Fawcett said, according to O’Neal, who noted she was a “funny girl.”

O’Neal was back in Farrah’s life as she battled the cancer that eventually killed her, but she left him very little in his will.

“I was with her for 18 years. I only got four boxes, mostly shoes and videotapes,” O’Neal, 71, admitted in the emotional deposition.

“She boxed a few things and sent them to me… I was so surprised.”

But he steadfastly maintained in the deposition that the Warhol painting belonged to him and while Farrah had possession of it for some time, he never gave away ownership.

As The ENQUIRER previously reported The University of Texas and O’Neal have been battling over ownership of the Warhol portrait – one of two that the artist made of Fawcett  — since Nov. 2011. The painting may be worth millions.

According to The University of Texas, O’Neal allegedly removed the Warhol from Fawcett’s multi-million dollar Wilshire Boulevard condominium just days after she died on the same day as Michael Jackson, the King of Pop.

It hasn’t been established if, at that point, O’Neal knew that he’d been left out of Fawcett’s will, a document that bequeathed $4.5 million to the couple’s only child together, Redmond, and her vast art collection to the University of Texas.

Under oath, O’Neal claimed he couldn’t muster the strength to read Fawcett’s will and was instead delivered the news from Richard Francis, whom he described as his “hands-on personal manager.” Francis is the trustee of Fawcett’s estate and chairman of the Farrah Fawcett Foundation, an organization created after her death.

 “It was just too sad for me,” O’Neal said about his inability to read Farrah’s will.

“He (Francis) said the whole — her whole art collection was going to the University of Texas, which sort of jarred me. But I didn’t mind. If that’s what she wanted to do, that was fine, with the exception of the Warhol, which he knew was mine.

“Let it go,” O’Neal remembered saying, at the time. “It can all go (because) I have my memory of her.”

Francis, in his own deposition, recalled a conversation a week before Fawcett died when O’Neal had told him he owned the Warhol.

 “Ryan mentioned to me that — one of them belonged to him, you know, of course I accepted it,” Francis told lawyers.

“I accepted it because I’ve known this man all my life, you know, for 40 odd years and I had known Farrah for a long time, I had known their relationship for a long, long time.”

And according to O’Neal, he should retain custody of the painting so that it can be left to Redmond, who has battled drug addiction since his teens and has been in and out of jail and rehab centers for crimes related to substance abuse.

 “This painting goes on to Redmond, her son,” O’Neal recalled of a conversation with Francis, to the lawyers.

“The implication was if I die, the painting would then go to (the University of) Texas. “I said, ‘No, it can’t do that. It goes to Redmond. It goes to Redmond. It’s his mother.’”

The case is expected to reach a federal courtroom in Los Angeles later this year. High-profile Hollywood lawyer Marty Singer is representing O’Neal in the case, RadarOnline.com reported.

The case has an interesting sideshow as well. A court of appeals ruled earlier this year that Ryan has enough evidence to continue his defamation suit against Craig Nevius, who once worked with Farrah, and charged in several interviews that O’Neal stole the Warhol painting.