After a two-month separation that nearly ended in divorce, former “Dynasty” star Catherine Oxenberg agreed to take back her estranged husband Casper Van Dien under one condition — he attend therapy to get help for his womanizing!

In September, the 40-year-old actress demanded that Van Dien, 32, move out of their Los Angeles home after he admitted he’d cheated on her during their two-year marriage.

Then, just days after the “Starship Troopers” star’s heart-wrenching confession, Catherine gave birth to their daughter Maya.

A desperate Casper begged Catherine to let him come back home to be with his family. But she laid down the law and told him to seek professional treatment for his infidelity problems — or give her a divorce!

“This is the last chance for Casper,” a friend told The ENQUIRER. “He’ll either follow Catherine’s orders and continue going to therapy, or he’s going to find himself in the middle of a bitter divorce.

“Catherine’s heart was shattered when he confessed to cheating on her. After Maya was born, Casper started calling her house — sometimes a dozen times a day — begging for her forgiveness. But Catherine wouldn’t budge.

“She was telling friends that Casper didn’t deserve another chance after what he’d done, and that she was going to file for divorce. But Catherine was still very much in love with Casper and wasn’t ready to throw in the towel on their marriage.

“She let him come to her house to see Maya, and he’d show up almost every day with flowers and small gifts.

“Casper’s visits started to become more frequent and lasted longer each day.

Before she knew it, he was spending practically all his time at their home.

Catherine’s first marriage to movie producer Robert Evans lasted only 10 days before it was annulled.

“He was doing anything he could to get back in her good graces, and it reminded Catherine of how wonderful their relationship used to be.

“Catherine agreed to let Casper spend Thanksgiving with her and the children, and it turned out to be one of the best they ever had.”

Oxenberg, daughter of Princess Elizabeth of Yugoslavia, has a 10-year-old daughter India from a previous relationship, but refuses to reveal the identity of the father. Van Dien has two children from his first marriage to legendary actor Robert Mitchum’s granddaughter Carrie.

“Catherine went to the first couple of therapy sessions with Casper, but found it too difficult to listen to the steamy details about the other women he had sex with,” the friend disclosed.

“Casper continues to go twice a week, and he’s walking on eggshells trying to make sure she’s happy.

“Catherine is supporting him while he goes to therapy, but she’s warned him that this is his last chance.

“If he so much as looks at another woman, their marriage is over!”