Bob Filner was sentenced Monday to three months of home confinement and three years of probation for harassing women while he was mayor of San Diego, completing the fall of the former 10-term congressman who barely a year ago achieved his long dream of being elected leader of the nation’s eighth-largest city.

Filner, who resigned amid widespread allegations of sexual harassment, pleaded guilty in October to one felony and two misdemeanors for placing a woman in a headlock, kissing another woman and grabbing the buttocks of a third.

Superior Court Judge Robert Trentacosta’s sentence was the same as what prosecutors recommended in a plea agreement with Filner. The 71-year-old former mayor faced a maximum penalty of three years in prison for the felony and one year in jail for each misdemeanor.

Filner apologized to victims and told the judge that he would work to earn back the trust of those he betrayed and recover his integrity — a sharp contrast to his defiant resignation speech nearly four months ago in which he said he was the victim of “a lynch mob.”

“I want to apologize to my family, who have stood by me through this ordeal, to my loyal staff and supporters, the citizens of San Diego and most sincerely to the women I have hurt and offended. … Certainly the behaviors before this court today will never be repeated,” he said in a brief statement.

In a defense memorandum written for the judge to consider in sentencing, attorney Jerry Coughlan said that as mayor, Filner ended his exercise routine and stopped therapy that congressional doctors prescribed “to help stabilize his mood and safeguard mental health.”

The disruption in his medications and stress associated with his new job “substantially contributed” to his misconduct, the attorney wrote.

Among sentencing terms, Filner cannot seek or hold elected office while on probation and will be monitored by GPS during his home confinement, which begins Jan. 1. Exceptions to home confinement include medical, mental health and therapy appointments as well as travel to religious services.

Melissa Mandel, supervising state deputy attorney general, said victims in the criminal complaint did not want to address the court. She said Filner had demeaned, humiliated and embarrassed them.

“Today is the day that Bob Filner begins to pay his debt to the citizens of San Diego,” she said.

Filner sold himself to voters as a champion of civil rights, she said, but his behavior revealed a “very different person.”

“Only time will tell if Filner is the changed man he claims to be,” she said.

Filner, who is twice divorced, was convicted of felony false imprisonment for what a probation officer’s report described as putting a woman in a headlock after a dinner party on March 6 and attempting to kiss her on the lips. The woman, identified in the probation report as a longtime Filner acquaintance in the tourism and hospitality business, told authorities that he kissed her eye and “slobbered” on her cheek as she turned away. She elbowed him to get free.

The misdemeanor counts of battery were for kissing a woman on the lips without permission at a “Meet the Mayor” on April 6 and grabbing another woman’s buttocks at a May 25 rally to clean up Fiesta Island in Mission Bay. None of the victims have been identified.

Nearly 20 women have publicly identified themselves as targets of Filner’s unwanted advances, including kissing, groping and requests for dates. His accusers include a retired Navy rear admiral, a San Diego State University dean and a great-grandmother who volunteers answering senior citizens’ questions at City Hall.