Dozens of middle school students will be tested for hepatitis and HIV after their substitute science teacher allowed them to share needle-like instruments to prick their fingers for blood.

The teacher, whose name was not released, was giving a life-science lesson to five seventh-grade classes Thursday at John F. Kennedy Middle School when he asked for volunteers to have their blood drawn using lancets so they could look at it under microscopes. Lancets are similar to the tools that diabetics use to test their blood sugar.

As many as 30 students agreed to the experiment, and the teacher allowed them to share lancets rather than give each one their own, according to Jan Christensen, superintendent of the Redwood City School District.

"I'm shocked and stunned that anyone would have thought this was appropriate protocol," Christensen said Monday.

A mother whose daughter participated in the class told school officials last week, and they notified county health officials and parents whose children may have had blood drawn.

Chances are slim that anyone was infected with Hepatitis B, Hepatitis C or HIV, but health officials will be on campus Tuesday offering testing, according to Doris Estremera, spokeswoman for San Mateo County's health department.

The teacher, who was fired as a result of the incident, expressed deep remorse about what happened, Christensen said. He had worked there for the past six weeks as a long-term substitute for the regular teacher, who is on maternity leave.

"He was very honest about it. He screwed up," said Warren Sedar, principal at Kennedy. "He's got kids himself and he felt bad about putting anybody at risk and worrying the parents."