SAN DIEGO — After getting busted by undercover wildlife officers, a San Diego ivory dealer is being forced to turn over tens of thousands of dollars in illegal items, officials said Thursday.

Stephen Shu Wang, 54, was ordered by a judge to give up all 200 or so of his ivory artifacts and art pieces after he unknowingly sold illegal products to investigators in 2020, the San Diego City Attorney said in a news release.

Authorities say Wang ran his business out of a Carmel Valley garage and recruited buyers online. That’s how he unwittingly arranged sales with California Department of Fish and Wildlife agents, who used their interactions as evidence for a search warrant at his property.

Wang’s collection included chess sets, portions of elephant tusks, a screen with panels made from ivory, carvings of the “eight immortals” of Chinese mythology, a statue of a geisha and a variety of “netsuke,” which are miniature Japanese sculptures, officials said.

“Estimating the value of the items is difficult, since there is no legal market for their sale or purchase, but altogether they would likely fetch more than $100,000 on the black market,” a spokesperson for the city attorney wrote.

It’s illegal to sell or possess the ivory of elephants, rhinoceros, hippopotamus and other creatures under both state and federal law. Wang faced 15 criminal charges after the raid on his home in 2020. He could have received up to eight years in prison and fines between $40,000 and $320,000.

“Over the objections of the City Attorney’s Office,” his defense was instead granted “court-ordered diversion,” according to the news release. That is a policy under California law that allows defendants in some misdemeanor cases to avoid more serious penalties if they stay out of trouble with the law and follow certain court-ordered conditions.

In Wang’s case, that amounted to 100 hours of volunteer work with a nonprofit organization involved in animal conservation. He also had to consent to official searches of his home without a warrant and committing no further violations of the law, prosecutors said.

The city attorney’s office said future operations will target anyone else who tries to profit off the trade.

“The illegal and immoral ivory trade only serves to encourage the senseless slaughter of elephants and other endangered species,” City Attorney Mara Elliott said. “In partnership with the Department of Fish & Wildlife, we will continue to pursue and prosecute anyone who traffics in these black market goods.”