After a nearly two-year legal battle that rocked the Santa Clara community, Anthony Becker — the former vice mayor who resigned in December following his conviction on charges of leaking a grand jury report about the San Francisco 49ers and then lying about it — was sentenced Friday to 40 non-consecutive days in a jail work program.

Judge Javier Alcala announced the decision in Santa Clara County Superior Court in Morgan Hill, following an apology from Becker — the first time he’s made one publicly — “to the people of Santa Clara for this long ordeal.”

“I do respect this court, I do respect the process, and I do understand the verdict,” Becker told Alcala.

Becker will report to pre-booking on May 19. He was sentenced to a jail alternative for low-risk offenders and opted for a schedule of three days a week.

One of Becker’s attorneys, deputy public defender Christopher Montoya, declined to comment immediately following the decision but said they plan to appeal the conviction on charges that Becker violated his civic duty and committed perjury.

Alcala’s ruling comes nearly two years after Becker’s April 2023 indictment on charges related to leaking a bombshell Santa Clara County Civil Grand Jury report about the San Francisco 49ers’ influence on the city of Santa Clara to the NFL team and a local news outlet — and then lying about it under oath. His highly anticipated trial began the day after Election Day last year in which Becker’s reelection bid resulted in his falling to last in a three-way race for his District 6 council seat.

District Attorney Jeff Rosen, who was present in the courtroom for both the conviction and Friday’s sentencing, told reporters that he thought the decision was appropriate. Rosen and Deputy District Attorney Jason Malinsky asked Alcala for “significant jail time” in a January memo to the judge. The prosecutors contended Becker “has shown no remorse,” citing a report in which Becker told his probation officer that he felt his conviction was “about politics” and that “justice was not served.”

“When a person takes elected office and an oath and then abuses that office and breaks that oath, that person mocks the people of their community, that person is essentially saying to the people who elected them, ‘I am above you, I am above the law,’ ” Rosen said outside of the courthouse. “And that will not stand, and that has not stood.”

City Councilmembers Suds Jain and Kevin Park both made pleas to the judge for leniency. Jain spoke of Becker’s dedication while on the council, saying he’d monitor city commissions and walked the creek to talk to homeless residents. The trial, he said, has been an “extreme hardship” for his friend. Jain said that Becker told him recently that he only had $69 in his bank account and that he cashed out his retirement.

“I believe he’s learned his lesson,” Jain told the judge. “He is by no means an aggressive or violent person.”

Park described Becker as one of the most resilient people that he knows and said that his former colleague has faced harassment and scrutiny.

“He believes in doing the right thing, and he’s willing to do the work to show that,” Park said. “He has not gained from this in any way. Even before the trial came to light, he had lost so much before that.”

Before Alcala issued the sentence, Montoya reemphasized the request he made in a court filing the day prior: for the judge to follow the county probation department’s recommendation and give Becker probation. Montoya argued that Becker has already lost his job and had ruined his reputation. His mother was also recently diagnosed with breast cancer, creating further hardship for him and his family.

Alcala said that he believed that there “has to be some kind of punishment because people in the community are not going to think people are held accountable.” If Becker hadn’t issued an apology, the judge said, he would have sentenced him to jail time and not the work program.

Becker’s trial, which lasted several weeks spanning November and December, was contentious throughout. The prosecution called more than a dozen witnesses, while the defense called none, and Becker declined to take the stand. On Dec. 5, after only a few hours of deliberation, the jury returned to the courtroom with a guilty verdict.

The document at the center of Becker’s trial was a 2022 civil grand jury report titled “Unsportsmanlike Conduct” that was set to be released a few weeks ahead of Election Day. At the time, Becker was challenging current Mayor Lisa Gillmor for her seat.

But the report, which sent shockwaves through Santa Clara, was leaked several days before it was supposed to be made public. The 49ers were spending heavily on the 2022 mayoral election and shelled out more than $1.4 million trying to get Becker elected and another roughly $1 million attacking Gillmor.

The NFL team called the report a “hatchet job,” and it was revealed at trial that the 49ers investigated whether any of the grand jurors who authored the report were biased.

The prosecution relied heavily on its star witness: Rahul Chandhok, the 49ers’ former chief of communications. Chandhok, who now works for the United States Soccer Federation, testified that Becker leaked the report.

Throughout the trial, Becker’s attorneys fought to cast doubt in the minds of the jury and argued that he wasn’t the only one who had access to the report before it was public.

Becker’s attorneys now have 60 days to file any appeal.