On the cusp of his retrial on rape charges, former Carmel physician Carl Bergstrom learned Friday he would be set free.

The trial was to be the second for Bergstrom, 56, after an appeals court struck down his 2009 forcible rape conviction in 2011 because of improper jury instructions.

After a plea deal that eliminated the rape charge, Bergstrom pleaded no contest on Friday to a count of felony sexual battery on his victim, known in court as Jane Doe.

Poised and appearing to weigh her words, Doe gave a statement at Friday's hearing.

"I came here to get closure and speak my voice," the petite woman said.

Then she addressed Bergstrom directly.

"You are guilty. These past few years through this whole ordeal — no woman should have to go through (that). And by the grace of God I lived through that," she said.

She said she has since met many sexual assault victims, female and male, who don't come forward but know how much the crime can affect their lives.

"So I am speaking today not only for myself, but all these other people as well who don't get this opportunity," she said. "This is a horrendous crime. It's not just a physical crime. For a while it robbed me of my spirit ... (but) I tried to stay away from hatred in this whole thing.

She also told Bergstrom, "I really just wanted to hear you say that you are guilty. To own up to what you have done to people. ... At some point, you need to take responsibility."

Doe accused Bergstrom of forcibly sodomizing her in his Carmel home after a night of drinking in April 2009, and she testified in his first trial that he would not stop even when she told him to and cried out in pain.

Two other women testified were similarly assaulted by the physician on other occasions. Both women testified they believe they might have been drugged.

As part of the plea agreement, prosecutor Cristina Johnson said any possible cases involving Bergstrom and the other women will not be pursued.

She said Doe and the other women were aware of Friday's deal and approved it.

Another trial, Johnson said, would mean Doe would have to go through more of the intense media attention the case has garnered for years.

"In sexual assault cases, you do have to consider the emotional trauma to the victim," she said.

Judge Julie Culver praised Doe's "fortitude and strength in coming forward." She said she understood Doe's "wanting or needing to see Mr. Bergstrom admitting guilt in this matter."

Before he was arrested in 2009, Bergstrom was a "concierge" doctor on the Peninsula whose patients paid to keep him on a full-time retainer.

In April 2009, he and Doe, who were professional acquaintances, met at a Carmel bar. That night, after they drank wine at his house, he sexually assaulted her, Johnson said.

Doe called 911, and Carmel police found her crying hysterically on the curb in front of his house about 3 a.m.

In July of that year, Bergstrom was found guilty of forcible sodomy and sentenced to six years in prison, but quickly filed an appeal.

Immediately after the conviction, Bergstrom gave up his medical licenses in California and Idaho just as California's Medical Board took steps to revoke his license because of the case.

Jennifer Simoes of the state medical board said Friday that state code requires the state to "promptly" revoke the license of anyone required to register as a felony sex offender.

The board cited several additional reasons for the revocation based on audio recordings of Bergstrom, including jailhouse phone calls that indicated he was practicing medicine while in Monterey County Jail.

According to court records, Bergstrom once inadvertently left a dictation machine running in his office that recorded him offering to sell cocaine or trade it for sex. He admitted at trial that he traded prescription drugs for cocaine.

In 2011, he was serving his sentence in state prison when the Sixth District Court of Appeal overturned his conviction because of improper jury instructions issued by Judge Russell Scott.

Bergstrom's attorney, Richard Rosen, said he planned to reveal evidence indicating Doe falsely accused his client, along with expert witnesses that would help his case.

But Bergstrom was not a free man yet. He was held in jail in lieu of bail as his retrial slowly began churning through the court.

Attorneys have said his assets are depleted.

A lawsuit for damages filed by Doe is scheduled for trial in Monterey, though it is unclear what, if any, resources Bergstrom may still possess. A public records database shows he no longer owns his Carmel Woods house.

Although numerous supporters have vocally defended him through the years, on Friday none was present in court. But Rosen said his client's father and brother have been supportive over the past year as Bergstrom faced a new trial.

Bergstrom was sentenced Friday to four years in prison. He has already served about 3½ years in jail and prison, and because of good behavior in prison, his incarceration "credits" amount to seven years.

As a result, Bergstrom was expected to be released late Friday from Monterey County Jail, Rosen said.

According to state corrections records, he was previously housed at Avenal State Prison.

Bergstrom's new sentence includes restitution fines and three to five years' parole.

But it is unclear whether he will have to be on parole because his time-served credits include the equivalent of three years of supervision.

He will have to register as a sex offender for life and has waived his right to an appeal.

Rosen declined to say what plans Bergstrom has for the future and offered a simple explanation for his client's admission to the charges.

"Sometimes you have to plead to get out of jail," Rosen said outside the courtroom. "By doing this plea bargain, he's out tonight."

Appearing attentive as Doe spoke in court, Bergstrom did not make a statement.

But before ending the hearing, Judge Culver said she hoped Bergstrom will take Doe's statements to heart.