The Oakland school district is testing the limits of a new state law requiring students in grades 7 to 12 to be immunized against whooping cough within 30 days of the start of school.

As the deadline hit on Monday, with as many as 1,300 students still out of compliance, the district administration instructed principals not to send anyone home, shots or no shots.

"We're not standing guard at the door to the school, using it as a checkpoint and refusing entrance to students who haven't complied," said Troy Flint, a spokesman for the Oakland school district.

Instead -- at least, for the rest of the week -- schools will continue pestering parents to sign an immunization consent form and giving students shots while they're at school.

"We think this is the best way to get students immunized," Flint said. "We don't want to create a situation where you have students who aren't coming to school."

Whooping cough, a leading cause of death for infants until the mid-20th Century, is having a resurgence, with more than 9,100 cases reported in California last year and 2,460 reported this year, according to the California Department of Public Health.

The contagious disease typically lasts for weeks and can be fatal to babies and those with weak immune systems. While most children receive a booster shot before they start kindergarten, researchers believe the preventive effects are wearing off sooner than once thought. The Centers for Disease Control and Prevention recommends that adolescents receive a booster dose.

School nurses have vaccinated hundreds of Oakland students since the spring. At the start of the school year, nine middle and high schools had health clinics on campus. Still, as of Friday, about 11 percent of students had yet to show proof of vaccination.

Mt. Diablo Unified in Contra Costa County, by contrast, had a compliance rate of more than 99 percent as of Friday.

In West Contra Costa schools, about 14 percent of the middle and high school students were out of compliance at the end of last week, said Marin Trujillo, the district spokesman. He said he thought some of those 1,500 students had, in fact, received their vaccinations but had yet to return their paperwork.

Trujillo didn't have an estimate of how many students were barred from their classes after Monday's deadline, but he said some students were sent home.

The strict enforcement seemed to work at Berkeley High School. By Thursday's deadline, 240 students came to school without their shots and were kept out of class; by the next day, all but 26 had complied.

Flint said it might take such a reality check for some Oakland students and their families to comply -- but, hopefully, not in all 1,300 cases.

Staff writers Theresa Harrington and Doug Oakley contributed to this report. Read Katy Murphy's Oakland schools blog at IBAbuzz.com/education. Follow her at Twitter.com/katymurphy.