Sgt. Donald Forte, 58, a 37-year-veteran of the San Francisco department, was charged by the Alameda County District Attorney's Office with a felony count of lewd act on a child 14 or 15 by someone at least 10 years older.
If convicted, Forte faces up to three years in prison and must register as a sex offender. He could not be reached for comment.
Forte, a motorcycle squad supervisor, was able to post $138,000 bail after his arrest Thursday night.
Forte appeared in court Monday for arraignment but did not enter a plea. He asked that the proceeding be continued until July 2 so he can hire an attorney, authorities said.
Authorities said Monday that Forte made some admissions about what happened and was "cooperative with officers."
The girl, an Oakland resident working as a prostitute for the first time, also cooperated with police, officials said.
Police said Forte apparently was under the impression the girl was at least 18. He is suspected of negotiating a $50 fee to have sex with her after picking her up in the 1700 block of International Boulevard, an area known for prostitution activity, authorities said.
Two Oakland officers found the pair in Forte's Ford Taurus about 11:36 p.m.
That is an area where many prostitutes working along International bring their customers, police said.
The officers saw what they thought was suspicious activity in the car and found them inside with their clothes in disarray, authorities said.
Authorities said a DNA comparison confirmed the two had sex.
Forte was booked at Santa Rita Jail and the girl was later released to her family, authorities said.
San Francisco police internal affairs investigators met with Oakland police about the case after Forte's arrest. He was later suspended without pay.
Ironically, at about the time Forte was being arrested, Oakland police were ending a sting operation in West and North Oakland along San Pablo Avenue where male officers posed as customers to snare prostitutes.
The operation netted 25 suspected prostitutes, at least one 16 years old, from 23rd Street to the Berkeley border.
Most were from Oakland but some were from as far away as Sacramento and Santa Rosa, Sgt. Tom Hogenmiller said.
He said the sting operation was something police frequently do to combat child exploitation and human trafficking as well as address quality-of-life issues in the different neighborhoods.
"If we find very young girls we try to help them," Hogenmiller said. "We treat them as victims and try to make cases on their pimps."