CLAYTON -- A teacher at Diablo View Middle School was arrested Friday on suspicion of having an inappropriate sexual relationship with a former student, authorities said.

Police said Andrew Bruce Cottrell, a 41-year-old Walnut Creek resident, confessed to engaging in unlawful sexual intercourse and other acts with the victim. Cottrell was arrested around noon at the school, where he teaches math and science, Walnut Creek police Sgt. Tom Cashion said in a news release.

Cottrell is being held at County Jail in Martinez, and his bail was set at $975,000. Police said he was arrested on suspicion of six counts of sexual intercourse with a minor under 16, two counts of lewd acts with a victim who is 14 or 15, and nine counts of oral copulation by a person over 21 upon a person who is under 16.

Deputy district attorney Nancy Georgiou, the head of the district attorney's sex crime unit, said she will consider filing charges early next week.

Steven Lawrence, superintendent for the Mt. Diablo school district, announced the arrest via automated phone call to district parents.

"Children's safety is a paramount concern to our district," Lawrence said in the message. "We are actively cooperating with both police departments to ensure they have all the support they need in this matter."

Melissa Kirmsse, the parent faculty club treasurer, said the arrest took place while students were at school. Parent club President Megan Kommer said students told her that Cottrell was taken away in handcuffs.

"Both my children had him," Kirmsse said. "I'm very saddened by the whole thing. It's really tragic."

Detectives are encouraging anyone who might have other information to contact Walnut Creek police at 925-943-5844.

Staff writers Robert Salonga, Theresa Harrington and Malaika Fraley contributed to this report.