The mayor of Stockton was briefly detained and had two of his laptops and a cell phone confiscated by homeland security agents at the San Francisco International Airport earlier this week after returning from a trip to China.

Mayor Anthony R. Silva, who was elected in November 2012, had traveled to China for a mayor’s conference, he said in a statement. Upon his return home on Monday, Silva was briefly detained by Department of Homeland Security agents and had his belongings searched, he said.

“A few minutes later, DHS agents confiscated all my electronic devices including my personal cell phone. Unfortunately, they were not willing or able to produce a search warrant or any court documents suggesting they had a legal right to take my property. In addition, they were persistent about requiring my passwords for all devices,” Silva said.

Silva was not allowed to leave the airport until he gave his passwords to the agents, which the mayor’s personal attorney, Mark Reichel, claimed is illegal.

The mayor said the agents told him confiscating property from travelers at the airport was “in fact routine and not unusual,” and promised to return the items within a few days.

Silva was also told he had “no right for a lawyer to be present” and that being a U.S. citizen did not “entitle me to rights that I probably thought.”

He has yet to get the property returned, according to Reichel. The mayor said Reichel contacted the U.S. Attorney’s Office in Sacramento but was told that “we can neither confirm or deny if we have the mayor’s possessions.”

On Friday, Lauren Horwood, the spokeswoman for the U.S. Attorney’s office in Sacramento, said that they had no comment on the mayor’s statement and that they could not confirm the facts presented in his statement.

“Our policy is to not confirm or deny investigations,” Horwood said.

James Schwab, spokesman for the U.S. Immigration and Customs Enforcement, also would not disclose why Silva was detained.

“We can't control what the mayor or his representatives say ... but that won't dictate what we do or don't release to the media,” Schwab said. “Our priority is assuring the integrity of the investigative process and generally speaking we don't acknowledge that an investigation is underway ... unless or until charges are filed, arrests are made, or documents are publicly filed with the court that confirm a probe is taking place.”

For his part, Silva said he’s “happy to cooperate and comply with these inspection procedures if they are in fact routine and legal.”

Silva, however, raised several concerns with the incident.

“I think the American people should be extremely concerned about their personal rights and privacy,” he said. “As I was being searched at the airport, there was a Latino couple to my left, and an Asian couple to my right also being aggressively searched. I briefly had to remind myself that this was not North Korea or Nazi Germany. This is the land of the Free.”

Silva went on to say that he is “confident that any forensic search of my personal devices will never ever show illegal or inappropriate activities of any sort.”

Silva said the trip to China was sponsored by China Silicon Valley, a California nonprofit corporation committed to promoting investment and business between China and the Silicon Valley.

Hamed Aleaziz is a San Francisco Chronicle staff writer. E-mail: haleaziz@sfchronicle.com Twitter: @haleaziz