PALO ALTO, Calif. — A former Silicon Valley executive whose wife said he battered and abused her for a decade will spend less than two weeks in jail after a judge approved his plea deal on Thursday.

Abhishek Gattani was ordered to report to jail on Friday to begin serving 30 days behind bars. However, the jail time will be reduced to 13 days because of time he’s already served and credit for good behavior since his arrest last year.

Gattani must perform weekend community service work for five months after his release.

Santa Clara County Superior Court Judge Allison M. Danner also ordered Gattani to avoid alcohol during his probation.

His estranged wife, Neha Rastogi, urged the judge for a longer jail sentence, calling domestic violence “truly terrorism” and saying that she had been victimized by the judicial system.

“My abuse continued by proxy, by the court system,” she said in court, the San Jose Mercury News reported (http://bayareane.ws/2sFhvfw).

Gattani had faced two felony counts of domestic abuse but pleaded no contest earlier this year to a non-violent felony charge of being an accessory after the fact and a misdemeanor count of offensive touching.

That could reduce the chances of Gattani facing deportation to his native India.

Rastogi has claimed Gattani abused her during 10 years of marriage and the plea deal announced by prosecutors enraged her sympathizers. A small group of protesters gathered outside the court on Thursday.

However, prosecutors have said they did the best they could.

In an April 28 memo to the court, District Attorney Brian Welch said the plea deal “struck hard blows, but not foul ones” and took into account several factors, including the strength of the evidence, inconsistent statements in the past by Rastogi, and the likelihood of winning a conviction if the case went to trial.

The case began last July when Rastogi told police that Gattani — with whom she has a 3-year-old daughter — had beaten her. It came to a head April 13, when Rastogi ripped the plea deal in Santa Clara County Superior Court, prompting a judge to postpone sentencing.

Rastogi had made audio recordings in which Gattani allegedly verbally abused her or hit her.

Gattani was charged in 2013 with misdemeanor domestic violence stemming from a confrontation with his wife but prosecutors later reduced that to misdemeanor disturbing the peace. His conviction was expunged after he completed probation and a domestic violence education program.