SAN FRANCISCO (AP) — A husband and wife have been charged with torture and other counts after a bruised, terrified 17-year-old showed up at a gym with a chain locked to his ankle, claiming he had just fled his captors, authorities said Tuesday.

Kelly Layne Lau, 30, and Michael Schumacher, 34, were arrested late Monday, said Matt Robinson, a spokesman for police in Tracy.

They had been taken into custody for questioning earlier in the day at their home in Tracy, where the emaciated boy was allegedly held against his will. A search of the home turned up evidence implicating the couple, Robinson said. Tracy is about 60 miles east of San Francisco.

They were charged with torture, kidnapping and child abuse, and were set to appear in court Thursday, officials said. Bail was set at $1.2 million for Michael Schumacher but his wife’s bail had not been set, authorities said.

Police said they were searching for a third suspect but wouldn’t give details.

The boy turned up half-naked Monday at the In-Shape Sports Club, near the couple’s home. It’s not clear how he ended up in Tracy; authorities said he ran away last year from a foster home in Sacramento, about 70 miles to the north.

Robinson said the boy was confused when approached by detectives Monday, unsure where he had come from and how long had been held against his will. He was taken to a hospital.

‘‘The wounds he had and his physical condition as well as having a chain around his leg corroborated his basic statement that he was being held against his will,’’ Robinson said.

Chuck Ellis, a manager of the In-Shape Sports Club, said the boy came into the fitness center Monday afternoon wearing only boxer briefs, covered with what appeared to be soot. Ellis says the teen was scared someone was going to come after him and asked to be hidden.

‘‘He said ‘Don’t let them get me, don’t let them get me,’’’ Ellis said. ‘‘He was totally terrified.’’

Ellis said the teenager told him he was picked up after running away from the foster home to look for his family and that he had been held for almost a year. Ellis said he looked like he was only 10 to 12 years old.

Robinson said detectives plan to interview the boy more Tuesday when he is a ‘‘little healthier.’’