OAKLAND — Police were responding to a report of an adult sex worker being beaten and robbed in a local hotel, when they inadvertently rescued a missing 16-year-old girl from Southern California, according to court records.

Now the man allegedly driving her around, identified in court papers as Jordan Sanders, 28, of Stockton, has been charged with human trafficking of a minor.

Sanders, jailed in lieu of $200,000 bail, was allegedly tied to both victims in the Sept. 7 incident. Police identified him as the longtime pimp of the hotel beating victim, and say he was trafficking the girl, forcing her to work off a $5,000 fee to earn her freedom.

Alameda County prosecutors charged Sanders with soliciting a minor and pandering, and say he has three prior felony convictions.

It all started around 8 p.m. on Sept. 7, when a woman called police to report that being robbed of $500 while a man dragged her around the Palms Motel on West MacArthur Boulevard in Oakland, authorities said. The alleged robber, identified as a 20-year-old suspected sex worker from Los Angeles, was arrested days later but hasn’t been charged, court records show.

Police identified Sanders as the suspected attacker and tracked him down on 9th Avenue and International Boulevard the following day. When they pulled him over in a Kia K5, the girl was with him in the vehicle, along with eight condoms and a motel key, according to police.

The girl told authorities she was trying to pay Sanders $5,000 so that she could leave him and return to a previous pimp, according to investigators. Officers noted that she had a lump on her forehead.

In a police interview, Sanders admitted to getting into an argument with his girlfriend at the motel but denied participating in a beating or robbery. He couldn’t explain why the girl — a runaway from Southern California — was in his vehicle, according to police.

Sanders’ preliminary hearing has been set for Oct. 20, where a judge will review evidence and decide if there’s enough to uphold the charges.