A Petaluma man was arrested in San Jose on suspicion of arranging to have sex with someone he believed to be an 11-year-old girl.

Shawhan Shams, 23, was arrested Wednesday after he drove to San Jose believing he had arranged to have sex with the girl, investigators said.

"We posed as a sex trafficker who has access to a child," said Santa Clara County Sheriff's deputy Kurtis Stenderup.

The investigation lasted eight months, with an agent from San Jose Homeland Security Investigations posing as a child sex trafficker and exchanging emails with Shams about having sex with a young girl. Shams also indicated a desire to physically abuse the girl, investigators said.

"It is very clear it's a minor," Stenderup said of communications that lasted eight months between Shams and the decoy.

During the arrest and interviews, Shams admitted his intent to have sex with a minor. He was in possession of items consistent with sexual activity, investigators said.

Shams is free on a $100,000 bail. His first court appearance is scheduled for June 26 when he is expected to be arraigned.

The sting was led by the Santa Clara County Sheriff's Office as part of the Santa Clara County Sheriff's Office Sexual Assault Felony Enforcement Task Force which is funded by the California Emergency Management Agency. Twelve agencies participate in the program.

(Staff Writer Kerry Benefield can be reached at 526-8671, kerry.benefield@pressdemocrat.com or on Twitter @benefield.)