SAN JOSE (CBS SF) — A judge dismissed bribery charges Tuesday brought against an Apple executive that connected him to a gun permit scandal at the Santa Clara County Sheriff’s office.

Santa Clara County Superior Court Judge Eric Geffon shut down the district attorney’s case against Thomas Moyer, Apple’s global head of security, in a decision released Tuesday morning.

READ MORE: UPDATE: Oakland City Council Votes To Hire, Train More Police After Spike in Homicides

“We are grateful to Judge Geffon for his careful, conscientious and thoughtful opinion. The judge got it right. Tom Moyer is innocent,” said Mary McNamara, one of Moyer’s attorneys.

The case began last year, after a grand jury indicted Santa Clara County Undersheriff Rick Sung and Sheriff’s Captain James Jensen, among others, for taking bribes in exchange for concealed carry weapon (CCW) permits.

READ MORE: Concealed Weapons Permit Scandal Grows; Grand Jury Indicts Santa Clara County Undersheriff, Sheriff’s Captain, Apple Security Executive

Jensen was among several people indicted on felony bribery and conspiracy charges in a scheme tied to Sheriff Laurie Smith’s 2018 reelection campaign. The office of Santa Clara County District Attorney Jeff Rosen said Jensen and three other defendants were accused of conspiring to engineer a $90,000 bribe — $45,000 of which allegedly went to support Smith’s re-election — to obtain the permits.

READ MORE: Giants Beat Padres 6-5, Maintain Narrow Lead In NL West

The DA has not brought any charges against Smith since the indictments were announced.

Thomas Moyer, Apple’s Global Head of Security. (LinkedIn)

Rosen’s office accused Moyer of promising to donate 200 iPads — worth about $70,000 — to Smith’s office in exchange for four CCW licenses. It accused Moyer of stopping the donation in Aug. of 2019 after Sung and Moyer learned of a search warrant that led to Rosen’s office seizing all of the sheriff’s CCW license records.

Similar charges were also brought against Harpreet Chadha. Reportedly Sung managed to extract from Chadha a promise of $6,000 worth of luxury box seat tickets to a San Jose Sharks hockey game at the SAP Center on Valentine’s Day 2019.

The charges came after two former managers of Silicon Valley international security firm AS Solution Inc. pleaded guilty to other crimes related to the scandal.

After hearing Moyer’s case, Geffon dismissed his charges, stating that the DA’s case was “pure speculation, and is not supported by the evidence presented to the grand jury.”

MORE NEWS: UPDATE: Fire Destroys House, Horse Boarding Facility In Penngrove; Evacuated Orders LIfted

“I thank the Court for giving this case such careful consideration, and for allowing me to move forward with my life,” Moyer said. “I also want to thank Apple, my friends and family for their unwavering support.”